fix extensionLoader error on dev environments where renderer might start early (#1447)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2020-11-19 16:11:58 +02:00
1 parent 5589a99e7e
commit d60eee20cc
2 files changed
+7 -5

No files matched your search

+5 -4
View File
@@ -34,10 +34,7 @@ export class ExtensionLoader {
}
@action
async init(extensions?: Map<LensExtensionId, InstalledExtension>) {
if (extensions) {
this.extensions.replace(extensions);
}
async init() {
if (ipcRenderer) {
this.initRenderer()
} else {
@@ -46,6 +43,10 @@ export class ExtensionLoader {
extensionsStore.manageState(this);
}
initExtensions(extensions?: Map<LensExtensionId, InstalledExtension>) {
this.extensions.replace(extensions)
}
protected async initMain() {
this.isLoaded = true;
this.loadOnMain();