Back out "Back out Electron 7.1.1/7.1.2 upgrades"

Summary:
Original commit changeset: 05d13aca7145

Attempt to upgrade `electron` as it instacrashed; `electron-builder` version 22.1.0 didn't sign package correctly and caused the instacrash,

Reduced the version to 21.2.0 (latest).

Reviewed By: passy, nikoant

Differential Revision: D18954671

fbshipit-source-id: bc2dbd4fec9afb51d9a535974651b13d195407b4
This commit is contained in:
Chaiwat Ekkaewnumchai
2020-01-06 09:42:46 -08:00
committed by Facebook Github Bot
parent 2fac06e018
commit bacb1958fc
11 changed files with 351 additions and 564 deletions

View File

@@ -108,7 +108,7 @@ export function setupMenuBar(
const menu = applicationMenu.items.find(
menuItem => menuItem.label === topLevelMenu,
);
if (menu) {
if (menu && menu.submenu) {
const menuItem = menu.submenu.items.find(
menuItem => menuItem.label === label,
);
@@ -270,7 +270,7 @@ function getTemplate(
{
label: 'Select All',
accelerator: 'CmdOrCtrl+A',
role: 'selectall',
role: 'selectAll',
},
],
},
@@ -384,7 +384,7 @@ function getTemplate(
];
if (process.platform === 'darwin') {
const name = app.getName();
const name = app.name;
template.unshift({
label: name,
submenu: [
@@ -411,7 +411,7 @@ function getTemplate(
{
label: 'Hide Others',
accelerator: 'Command+Shift+H',
role: 'hideothers',
role: 'hideOthers',
},
{
label: 'Show All',