mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
appease the linter overlords
This commit is contained in:
@@ -99,7 +99,6 @@ Menu.prototype.getMenuItemById = function (id) {
|
||||
return found
|
||||
}
|
||||
|
||||
//cleaned up
|
||||
Menu.prototype.append = function (item) {
|
||||
return this.insert(this.getItemCount(), item)
|
||||
}
|
||||
@@ -268,7 +267,10 @@ function indexToInsertByPosition (items, position) {
|
||||
|
||||
// compute new index based on query
|
||||
const queries = {
|
||||
'after': (index) => index += 1,
|
||||
'after': (index) => {
|
||||
index += 1
|
||||
return index
|
||||
},
|
||||
'endof': (index) => {
|
||||
if (index === -1) {
|
||||
items.push({id, type: 'separator'})
|
||||
@@ -285,4 +287,4 @@ function indexToInsertByPosition (items, position) {
|
||||
return (query in queries) ? queries[query](idx) : idx
|
||||
}
|
||||
|
||||
module.exports = Menu
|
||||
module.exports = Menu
|
||||
|
||||
Reference in New Issue
Block a user