ES6 cleanup 2

This commit is contained in:
Bryan Ashby 2016-07-02 20:05:14 -06:00
parent 5a5b39f3a4
commit 8803465762
1 changed files with 2 additions and 6 deletions

View File

@ -60,12 +60,10 @@ function MenuView(options) {
util.inherits(MenuView, View);
MenuView.prototype.setItems = function(items) {
const self = this;
if(items) {
this.items = [];
items.forEach( itemText => {
self.items.push( { text : itemText } );
this.items.push( { text : itemText } );
});
}
};
@ -112,12 +110,10 @@ MenuView.prototype.onKeyPress = function(ch, key) {
};
MenuView.prototype.setFocusItems = function(items) {
const self = this;
if(items) {
this.focusItems = [];
items.forEach( itemText => {
self.focusItems.push( { text : itemText } );
this.focusItems.push( { text : itemText } );
});
}
};