From 880346576289524adfd303dc1cb320b559fbf5b3 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sat, 2 Jul 2016 20:05:14 -0600 Subject: [PATCH] ES6 cleanup 2 --- core/menu_view.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/menu_view.js b/core/menu_view.js index bca7cab1..3c0524b9 100644 --- a/core/menu_view.js +++ b/core/menu_view.js @@ -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 } ); }); } };