From f46be1781c9f708a15e564df990d39f3ed7de096 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Tue, 25 Sep 2018 00:19:57 +0200 Subject: [PATCH] fix edit menu removal --- src/menu.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/menu.js b/src/menu.js index 7676628b..0cd2d648 100644 --- a/src/menu.js +++ b/src/menu.js @@ -10,10 +10,10 @@ const releasesPage = 'https://github.com/mifi/lossless-cut/releases'; module.exports = (app, mainWindow, newVersion) => { const menu = defaultMenu(app, electron.shell); - const editMenuIndex = menu.findIndex(item => item.Label === 'Edit'); + const editMenuIndex = menu.findIndex(item => item.label === 'Edit'); if (editMenuIndex >= 0) menu.splice(editMenuIndex, 1); - menu.splice((process.platform === 'darwin' ? 1 : 0), 0, { + const fileMenu = { label: 'File', submenu: [ { @@ -44,7 +44,9 @@ module.exports = (app, mainWindow, newVersion) => { }, }, ], - }); + }; + + menu.splice((process.platform === 'darwin' ? 1 : 0), 0, fileMenu); const helpIndex = menu.findIndex(item => item.role === 'help'); if (helpIndex >= 0) {