diff options
| -rw-r--r-- | app/main.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/main.js b/app/main.js index e9b7412854..b852557c22 100644 --- a/app/main.js +++ b/app/main.js @@ -131,6 +131,14 @@ const ApplicationMain = { _onBeforeQuit() { this._shouldQuit = true; + + if (process.env.NODE_ENV === 'development') { + const windowController = this._windowController; + if (windowController) { + windowController.window.closeDevTools(); + } + } + return true; }, @@ -152,8 +160,6 @@ const ApplicationMain = { if (process.env.NODE_ENV === 'development') { await this._installDevTools(); - - window.on('close', () => window.closeDevTools()); window.openDevTools({ mode: 'detach' }); } |
