Skip to content

Commit 6920ee6

Browse files
committed
Only check from window-all-closed
1 parent 0695f5c commit 6920ee6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main-process/native-ui/tray/tray.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ ipc.on('put-in-tray', function (event) {
1515
label: 'Remove',
1616
click: function () {
1717
event.sender.send('tray-removed')
18-
if (appIcon) appIcon.destroy()
18+
appIcon.destroy()
1919
}
2020
}])
2121
appIcon.setToolTip('Electron Demo in the tray.')
2222
appIcon.setContextMenu(contextMenu)
2323
})
2424

2525
ipc.on('remove-tray', function () {
26-
if (appIcon) appIcon.destroy()
26+
appIcon.destroy()
2727
})
2828

2929
app.on('window-all-closed', function () {

0 commit comments

Comments
 (0)