appease the linter overlords

This commit is contained in:
Shelley Vohr
2017-10-23 22:35:42 -04:00
parent 508b614769
commit 7c0f7329d9

View File

@@ -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