mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
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:
parent
4156f587a7
commit
8a3613ac6f
@ -34,10 +34,7 @@ export class ExtensionLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
async init(extensions?: Map<LensExtensionId, InstalledExtension>) {
|
async init() {
|
||||||
if (extensions) {
|
|
||||||
this.extensions.replace(extensions);
|
|
||||||
}
|
|
||||||
if (ipcRenderer) {
|
if (ipcRenderer) {
|
||||||
this.initRenderer()
|
this.initRenderer()
|
||||||
} else {
|
} else {
|
||||||
@ -46,6 +43,10 @@ export class ExtensionLoader {
|
|||||||
extensionsStore.manageState(this);
|
extensionsStore.manageState(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
initExtensions(extensions?: Map<LensExtensionId, InstalledExtension>) {
|
||||||
|
this.extensions.replace(extensions)
|
||||||
|
}
|
||||||
|
|
||||||
protected async initMain() {
|
protected async initMain() {
|
||||||
this.isLoaded = true;
|
this.isLoaded = true;
|
||||||
this.loadOnMain();
|
this.loadOnMain();
|
||||||
|
|||||||
@ -78,8 +78,9 @@ app.on("ready", async () => {
|
|||||||
app.exit();
|
app.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extensionLoader.init()
|
||||||
windowManager = WindowManager.getInstance<WindowManager>(proxyPort);
|
windowManager = WindowManager.getInstance<WindowManager>(proxyPort);
|
||||||
extensionLoader.init(await extensionManager.load()); // call after windowManager to see splash earlier
|
extensionLoader.initExtensions(await extensionManager.load()); // call after windowManager to see splash earlier
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
appEventBus.emit({ name: "service", action: "start" })
|
appEventBus.emit({ name: "service", action: "start" })
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user