fix: ensure main-window from global menu

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-10-07 23:37:31 +03:00
1 parent a2c39358ef
commit fb8c57b898
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -94,6 +94,6 @@ app.on("will-quit", (event) => {
windowManager?.destroy();
clusterManager?.stop();
proxyServer?.close();
app.exit(); // force quite
app.exit(); // forced app.quit()
}
})
+2 -1
View File
@@ -45,8 +45,9 @@ export function buildMenu(windowManager: WindowManager) {
return menuItems;
}
function navigate(url: string) {
async function navigate(url: string) {
logger.info(`[MENU]: navigating to ${url}`);
await windowManager.ensureMainWindow();
windowManager.navigate(url);
}