Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit d6d5db2

Browse files
committed
✨ Graciously fall back to primary monitor #239
...if monitor value provided is incorrect
1 parent 67ab7b1 commit d6d5db2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_boot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function createWindow(settings) {
8282
signale.info("Creating window...");
8383

8484
let display;
85-
if (!isNaN(settings.monitor)) {
85+
if (!isNaN(settings.monitor) && electron.screen.getAllDisplays()[settings.monitor]) {
8686
display = electron.screen.getAllDisplays()[settings.monitor];
8787
} else {
8888
display = electron.screen.getPrimaryDisplay();

0 commit comments

Comments
 (0)