From e2af466a731badf6939dcaffb19672299e356fc8 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Wed, 24 Jan 2024 17:09:48 +0100 Subject: fixed devtools mysteriously never opening --- src/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 917b8bd..74fe669 100644 --- a/src/index.js +++ b/src/index.js @@ -53,7 +53,15 @@ function start() { }); // when --devtools is added it'll open the dev tools - if (cli.hasParam("devtools")) {win.openDevTools()} + if (cli.hasParam("devtools")) { + // for some unknown, mysterious reason, the devtools just wont + // open if you call this immediately, that's how its worked for + // a very long time, and suddenly it stopped working, and this + // seemingly was the only fix + setTimeout(() => { + win.openDevTools(); + }, 1) + } // general setup win.removeMenu(); -- cgit v1.2.3