summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2022-03-28 17:17:26 +0200
committerOskar Nyberg <oskar@mullvad.net>2022-03-29 10:22:20 +0200
commit8d9d5058d973773e90f829c31bbfc70bf2c17398 (patch)
tree4bb7683932008aadc91d9d31da68a69d9d5079ed /gui
parentcd67cee7d0ce85401515994718f8cca9cfaa6ec9 (diff)
downloadmullvadvpn-8d9d5058d973773e90f829c31bbfc70bf2c17398.tar.xz
mullvadvpn-8d9d5058d973773e90f829c31bbfc70bf2c17398.zip
Fix devtools on Windows
Diffstat (limited to 'gui')
-rw-r--r--gui/src/main/index.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index c53456cc65..a6fcfa7be7 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -566,7 +566,11 @@ class ApplicationMain {
if (process.env.NODE_ENV === 'development') {
await this.installDevTools();
- this.windowController.window.webContents.openDevTools({ mode: 'detach' });
+
+ // The devtools doesn't open on Windows if openDevTools is called without a delay here.
+ this.windowController.window.once('ready-to-show', () => {
+ this.windowController?.window?.webContents.openDevTools({ mode: 'detach' });
+ });
}
switch (process.platform) {