Skip to content

Commit d2956e6

Browse files
Fix Refresh-Window
1 parent da4e930 commit d2956e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ElectronNET.WebApp/Controllers/MenusController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ public IActionResult Index()
3131
{
3232
// on reload, start fresh and close any old
3333
// open secondary windows
34+
var mainWindowId = Electron.WindowManager.BrowserWindows.ToList().First().Id;
3435
Electron.WindowManager.BrowserWindows.ToList().ForEach(browserWindow => {
35-
if(browserWindow.Id != 1)
36+
if(browserWindow.Id != mainWindowId)
3637
{
3738
browserWindow.Close();
3839
}

0 commit comments

Comments
 (0)