diff options
| author | Andrej Mihajlov <and@codeispoetry.ru> | 2017-02-24 18:32:19 +0000 |
|---|---|---|
| committer | Andrej Mihajlov <and@codeispoetry.ru> | 2017-02-24 18:32:19 +0000 |
| commit | c2b58db6a2a5fa0a1e31ad789905b1f72c9559ed (patch) | |
| tree | e3ca0197b74db32550817d60d6afcfc7088a4828 | |
| parent | 3dbca083293c852e57d85d5b4cb0a1eb02b34dee (diff) | |
| download | mullvadvpn-c2b58db6a2a5fa0a1e31ad789905b1f72c9559ed.tar.xz mullvadvpn-c2b58db6a2a5fa0a1e31ad789905b1f72c9559ed.zip | |
Fix rare bug when dev tools window is not created yet but isDevToolsOpened() reports true
| -rw-r--r-- | app/main.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/main.js b/app/main.js index b9aae68692..9c70dac8e5 100644 --- a/app/main.js +++ b/app/main.js @@ -49,7 +49,11 @@ const installDevTools = async () => { if(!window) { return; } if(window.isDevToolsOpened()) { - window.devToolsWebContents.focus(); + // there is a rare bug when isDevToolsOpened() reports true + // but dev tools window is not created yet. + if(window.devToolsWebContents) { + window.devToolsWebContents.focus(); + } } else { window.openDevTools({ mode: 'detach' }); } |
