diff options
Diffstat (limited to 'subprojects/frontend/src/RootStore.ts')
-rw-r--r-- | subprojects/frontend/src/RootStore.ts | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/subprojects/frontend/src/RootStore.ts b/subprojects/frontend/src/RootStore.ts index 54a80501..2e76d66d 100644 --- a/subprojects/frontend/src/RootStore.ts +++ b/subprojects/frontend/src/RootStore.ts | |||
@@ -23,18 +23,17 @@ export default class RootStore { | |||
23 | pwaStore: false, | 23 | pwaStore: false, |
24 | themeStore: false, | 24 | themeStore: false, |
25 | }); | 25 | }); |
26 | import('./editor/EditorStore') | 26 | (async () => { |
27 | .then(({ default: EditorStore }) => { | 27 | const { default: EditorStore } = await import('./editor/EditorStore'); |
28 | runInAction(() => { | 28 | runInAction(() => { |
29 | if (this.disposed) { | 29 | if (this.disposed) { |
30 | return; | 30 | return; |
31 | } | 31 | } |
32 | this.editorStore = new EditorStore(initialValue, this.pwaStore); | 32 | this.editorStore = new EditorStore(initialValue, this.pwaStore); |
33 | }); | ||
34 | }) | ||
35 | .catch((error) => { | ||
36 | log.error('Failed to load EditorStore', error); | ||
37 | }); | 33 | }); |
34 | })().catch((error) => { | ||
35 | log.error('Failed to load EditorStore', error); | ||
36 | }); | ||
38 | } | 37 | } |
39 | 38 | ||
40 | dispose(): void { | 39 | dispose(): void { |