appease the linter overlords
This commit is contained in:
parent
508b614769
commit
7c0f7329d9
1 changed files with 5 additions and 3 deletions
|
@ -99,7 +99,6 @@ Menu.prototype.getMenuItemById = function (id) {
|
||||||
return found
|
return found
|
||||||
}
|
}
|
||||||
|
|
||||||
//cleaned up
|
|
||||||
Menu.prototype.append = function (item) {
|
Menu.prototype.append = function (item) {
|
||||||
return this.insert(this.getItemCount(), item)
|
return this.insert(this.getItemCount(), item)
|
||||||
}
|
}
|
||||||
|
@ -268,7 +267,10 @@ function indexToInsertByPosition (items, position) {
|
||||||
|
|
||||||
// compute new index based on query
|
// compute new index based on query
|
||||||
const queries = {
|
const queries = {
|
||||||
'after': (index) => index += 1,
|
'after': (index) => {
|
||||||
|
index += 1
|
||||||
|
return index
|
||||||
|
},
|
||||||
'endof': (index) => {
|
'endof': (index) => {
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
items.push({id, type: 'separator'})
|
items.push({id, type: 'separator'})
|
||||||
|
@ -285,4 +287,4 @@ function indexToInsertByPosition (items, position) {
|
||||||
return (query in queries) ? queries[query](idx) : idx
|
return (query in queries) ? queries[query](idx) : idx
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Menu
|
module.exports = Menu
|
||||||
|
|
Loading…
Add table
Reference in a new issue