Skip to content

Commit

Permalink
[BUGFIX beta] #4443 - Replace forEach with a regular for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
dentuzhik committed May 18, 2014
1 parent 9b9819c commit 1319bc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages_es6/ember-runtime/lib/mixins/mutable_enumerable.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ export default Mixin.create(Enumerable, {
*/
removeObjects: function(objects) {
beginPropertyChanges(this);
forEach(objects, function(obj) { this.removeObject(obj); }, this);
for (var i = objects.length - 1; i >= 0; i--) {
this.removeObject(objects[i]);
}
endPropertyChanges(this);
return this;
}
Expand Down

0 comments on commit 1319bc1

Please sign in to comment.