Fixed linting
This commit is contained in:
parent
8aba640250
commit
76ee7fda2b
1 changed files with 9 additions and 12 deletions
|
@ -178,8 +178,7 @@ const roles = {
|
||||||
role: 'paste'
|
role: 'paste'
|
||||||
},
|
},
|
||||||
|
|
||||||
process.platform === 'darwin' ?
|
process.platform === 'darwin' ? {
|
||||||
{
|
|
||||||
role: 'pasteandmatchstyle'
|
role: 'pasteandmatchstyle'
|
||||||
} : {},
|
} : {},
|
||||||
|
|
||||||
|
@ -187,9 +186,8 @@ const roles = {
|
||||||
role: 'delete'
|
role: 'delete'
|
||||||
},
|
},
|
||||||
|
|
||||||
process.platform === 'win32' ?
|
process.platform === 'win32' ? {
|
||||||
{
|
type: 'separator'
|
||||||
type: 'separator'
|
|
||||||
} : {},
|
} : {},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -209,13 +207,11 @@ const roles = {
|
||||||
role: 'close'
|
role: 'close'
|
||||||
},
|
},
|
||||||
|
|
||||||
process.platform === 'darwin' ?
|
process.platform === 'darwin' ? {
|
||||||
{
|
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
} : {},
|
} : {},
|
||||||
|
|
||||||
process.platform === 'darwin' ?
|
process.platform === 'darwin' ? {
|
||||||
{
|
|
||||||
label: 'Bring All to Front',
|
label: 'Bring All to Front',
|
||||||
role: 'front'
|
role: 'front'
|
||||||
} : {}
|
} : {}
|
||||||
|
@ -245,13 +241,14 @@ exports.getDefaultAccelerator = (role) => {
|
||||||
|
|
||||||
exports.getDefaultSubmenu = (role) => {
|
exports.getDefaultSubmenu = (role) => {
|
||||||
if (roles.hasOwnProperty(role)) {
|
if (roles.hasOwnProperty(role)) {
|
||||||
submenu = roles[role].submenu
|
let submenu = roles[role].submenu
|
||||||
|
|
||||||
// remove empty objects from within the submenu
|
// remove empty objects from within the submenu
|
||||||
if (Array.isArray(submenu))
|
if (Array.isArray(submenu)) {
|
||||||
submenu = submenu.filter(function(n){
|
submenu = submenu.filter(function (n) {
|
||||||
return n.constructor !== Object || Object.keys(n).length > 0
|
return n.constructor !== Object || Object.keys(n).length > 0
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return submenu
|
return submenu
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue