Use 'Array.prototype.forEach' instead of '_.each' and '_.forEach'

This commit is contained in:
Hongarc 2018-12-01 11:28:04 +07:00
parent d87fd095c0
commit bd8009386d
19 changed files with 74 additions and 82 deletions

View file

@ -142,7 +142,7 @@ var MultiView = Backbone.View.extend({
// other views will take if they need to
this.keyboardListener.mute();
_.each(this.childViews, function(childView) {
this.childViews.forEach(function(childView) {
childView.die();
});
@ -183,7 +183,7 @@ var MultiView = Backbone.View.extend({
render: function() {
// go through each and render... show the first
_.each(this.childViewJSONs, function(childViewJSON, index) {
this.childViewJSONs.forEach(function(childViewJSON, index) {
var childView = this.createChildView(childViewJSON);
this.childViews.push(childView);
this.addNavToView(childView, index);