|
@@ -180,7 +180,7 @@ const roles = {
|
|
|
|
|
|
process.platform === 'darwin' ? {
|
|
|
role: 'pasteandmatchstyle'
|
|
|
- } : {},
|
|
|
+ } : null,
|
|
|
|
|
|
{
|
|
|
role: 'delete'
|
|
@@ -188,7 +188,7 @@ const roles = {
|
|
|
|
|
|
process.platform === 'win32' ? {
|
|
|
type: 'separator'
|
|
|
- } : {},
|
|
|
+ } : null,
|
|
|
|
|
|
{
|
|
|
role: 'selectall'
|
|
@@ -209,12 +209,11 @@ const roles = {
|
|
|
|
|
|
process.platform === 'darwin' ? {
|
|
|
type: 'separator'
|
|
|
- } : {},
|
|
|
+ } : null,
|
|
|
|
|
|
process.platform === 'darwin' ? {
|
|
|
- label: 'Bring All to Front',
|
|
|
role: 'front'
|
|
|
- } : {}
|
|
|
+ } : null
|
|
|
|
|
|
]
|
|
|
}
|
|
@@ -246,7 +245,7 @@ exports.getDefaultSubmenu = (role) => {
|
|
|
// remove empty objects from within the submenu
|
|
|
if (Array.isArray(submenu)) {
|
|
|
submenu = submenu.filter(function (n) {
|
|
|
- return n.constructor !== Object || Object.keys(n).length > 0
|
|
|
+ return n != null
|
|
|
})
|
|
|
}
|
|
|
|