Skip to content

Commit

Permalink
Fixed error if window not focused, closes #110
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Sep 13, 2021
1 parent 02c7d7e commit 869e6e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ class DatasetteServer {
if (
BrowserWindow.getAllWindows().length == 1 &&
(opts.forceMainWindow ||
new URL(BrowserWindow.getFocusedWindow().webContents.getURL())
new URL(BrowserWindow.getAllWindows()[0].webContents.getURL())
.pathname == "/")
) {
// Re-use the single existing window
Expand Down

0 comments on commit 869e6e6

Please sign in to comment.