Skip to content

Commit 120d1a5

Browse files
committed
config: ensure window is not destroyed
1 parent be9f15d commit 120d1a5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/config/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ ipcMain.on('DISCORD_UPDATED_QUOTES', (e, c) => {
66

77
let win;
88
exports.open = () => {
9-
if (win) return win.show();
9+
if (win && !win.isDestroyed()) return win.show();
1010

1111
win = require('../utils/win')({
1212
width: 500,
1313
height: 650
1414
}, 'config');
1515

16-
win.on('close', () => {
16+
win.on('closed', () => {
1717
win = null;
1818
});
1919

@@ -41,4 +41,4 @@ exports.open = () => {
4141
ipcMain.on('of', () => {
4242
shell.openPath(require('../paths').getUserData() + '/settings.json')
4343
});
44-
};
44+
};

0 commit comments

Comments
 (0)