fix: once did-stop-loading register after loaded

This commit is contained in:
林一二 2021-03-22 20:47:35 +08:00
parent 7212561746
commit 5fcaf3d0ea

View file

@ -196,6 +196,9 @@ export class Window implements IWindowService {
this.workspaceViewService.realignActiveWorkspace();
// ensure redux is loaded first
// if not, redux might not be able catch changes sent from ipcMain
if (!mainWindow.webContents.isLoading()) {
return resolve();
}
mainWindow.webContents.once('did-stop-loading', () => {
resolve();
});