Skip to content

Commit

Permalink
Fix Refresh-Window
Browse files Browse the repository at this point in the history
  • Loading branch information
GregorBiswanger committed Jul 28, 2019
1 parent da4e930 commit d2956e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ElectronNET.WebApp/Controllers/MenusController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ public IActionResult Index()
{
// on reload, start fresh and close any old
// open secondary windows
var mainWindowId = Electron.WindowManager.BrowserWindows.ToList().First().Id;
Electron.WindowManager.BrowserWindows.ToList().ForEach(browserWindow => {
if(browserWindow.Id != 1)
if(browserWindow.Id != mainWindowId)
{
browserWindow.Close();
}
Expand Down

0 comments on commit d2956e6

Please sign in to comment.