From 6c528625d8862b2b6179f9fa95f51b6d487c12d8 Mon Sep 17 00:00:00 2001 From: asmsuechan Date: Mon, 16 Jan 2017 04:36:23 +0900 Subject: [PATCH] Fix a bug due to event handler of before-quit on update --- lib/main-window.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/main-window.js b/lib/main-window.js index e8eec2bf..c62108f4 100644 --- a/lib/main-window.js +++ b/lib/main-window.js @@ -49,7 +49,12 @@ if (process.platform !== 'linux' || process.env.DESKTOP_SESSION === 'cinnamon') }) app.on('before-quit', function (e) { - config.set('windowsize', mainWindow.getBounds()) + try { + config.set('windowsize', mainWindow.getBounds()) + } catch (e) { + // ignore any errors because an error occurs only on update + // refs: https://github.com/BoostIO/Boostnote/issues/243 + } mainWindow.removeAllListeners() }) } else {