From 78a9fcde5665c76aa9571b9936b3cda0ba37486b Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 24 Jul 2020 17:02:28 +0300 Subject: [PATCH] fix: navigation via menu Signed-off-by: Roman --- src/main/menu.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/menu.ts b/src/main/menu.ts index dea1810326..09cd668976 100644 --- a/src/main/menu.ts +++ b/src/main/menu.ts @@ -12,7 +12,7 @@ import logger from "./logger"; export function initMenu(windowManager: WindowManager) { autorun(() => { - logger.debug(`[MENU]: refreshing menu, cluster=${clusterStore.activeClusterId}`); + logger.debug(`[MENU]: building menu, cluster=${clusterStore.activeClusterId}`); buildMenu(windowManager); }); } @@ -20,9 +20,9 @@ export function initMenu(windowManager: WindowManager) { function buildMenu(windowManager: WindowManager) { const hasClusters = clusterStore.hasClusters(); const activeClusterId = clusterStore.activeClusterId; - const clusterView = windowManager.getClusterView(activeClusterId); function navigate(url: string) { + const clusterView = windowManager.getClusterView(activeClusterId); broadcastIpc({ channel: "menu:navigate", webContentId: clusterView ? clusterView.id : undefined /*no-clusters*/,