diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-03-28 17:17:26 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-03-29 10:22:20 +0200 |
| commit | 8d9d5058d973773e90f829c31bbfc70bf2c17398 (patch) | |
| tree | 4bb7683932008aadc91d9d31da68a69d9d5079ed /gui | |
| parent | cd67cee7d0ce85401515994718f8cca9cfaa6ec9 (diff) | |
| download | mullvadvpn-8d9d5058d973773e90f829c31bbfc70bf2c17398.tar.xz mullvadvpn-8d9d5058d973773e90f829c31bbfc70bf2c17398.zip | |
Fix devtools on Windows
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/src/main/index.ts | 6 |
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) { |
