refactor: improve error handling

This commit is contained in:
4gray committed 2023-08-26 18:06:28 +02:00
1 parent 5e9e53a02a
commit 8774b77280
1 file changed
+2 -2
+2 -2
View File
@@ -64,7 +64,7 @@ function createWindow(): BrowserWindow {
}
win.on('close', () => {
store.set(WINDOW_BOUNDS, win?.getNormalBounds());
if (win) store.set(WINDOW_BOUNDS, win.getNormalBounds());
});
// Emitted when the window is closed.
@@ -144,7 +144,7 @@ try {
});
app.on('before-quit', () => {
store.set(WINDOW_BOUNDS, win?.getNormalBounds());
if (win) store.set(WINDOW_BOUNDS, win.getNormalBounds());
});
if (serve && process.platform === 'darwin') {