From bb5ace404b174f3ad328c21727d287538f93841a Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Fri, 6 Oct 2017 16:47:55 +0530 Subject: [PATCH] Electron-142 - Fixes the issue where it prevents creating multiple instances of the about window --- js/aboutApp/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/js/aboutApp/index.js b/js/aboutApp/index.js index 5a000adc..68888292 100644 --- a/js/aboutApp/index.js +++ b/js/aboutApp/index.js @@ -44,6 +44,16 @@ function getTemplatePath() { * which this window should show */ function openAboutWindow(windowName) { + + // This prevents creating multiple instances of the + // about window + if (aboutWindow) { + if (aboutWindow.isMinimized()) { + aboutWindow.restore(); + } + aboutWindow.focus(); + return; + } let allWindows = BrowserWindow.getAllWindows(); allWindows = allWindows.find((window) => { return window.winName === windowName });