diff --git a/src/scripts/events.js b/src/scripts/events.js index 683228d256..ed8c0a4768 100644 --- a/src/scripts/events.js +++ b/src/scripts/events.js @@ -234,7 +234,7 @@ export default () => { webview.on('ipc-message-unread-changed', (hostUrl, [badge]) => { - if (typeof unread === 'number' && localStorage.getItem('showWindowOnUnreadChanged') === 'true') { + if (typeof badge === 'number' && localStorage.getItem('showWindowOnUnreadChanged') === 'true') { const mainWindow = remote.getCurrentWindow(); if (!mainWindow.isFocused()) { mainWindow.once('focus', () => mainWindow.flashFrame(false));