Skip to content

Commit 9cddbcc

Browse files
committed
Add Menu as const
1 parent 777f7ec commit 9cddbcc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const path = require('path')
22
const electron = require('electron')
33
const ipc = electron.ipcMain
44
const app = electron.app
5+
const Menu = electron.Menu
56
const Tray = electron.Tray
67

78
let appIcon = null
@@ -10,7 +11,7 @@ ipc.on('put-in-tray', function (event) {
1011
const iconName = process.platform === 'win32' ? 'windows-icon.png' : 'iconTemplate.png'
1112
const iconPath = path.join(__dirname, iconName)
1213
appIcon = new Tray(iconPath)
13-
const contextMenu = electron.Menu.buildFromTemplate([{
14+
const contextMenu = Menu.buildFromTemplate([{
1415
label: 'Remove',
1516
click: function (menuItem, browserWindow) {
1617
event.sender.send('tray-removed')

0 commit comments

Comments
 (0)