Skip to content

Commit

Permalink
use _.indexOf instead of Array.prototype.indexOf
Browse files Browse the repository at this point in the history
we should probably have all of these es5 methods polyfilled. it's
confusing to only polyfill map/forEach.

fixes GA-223
  • Loading branch information
aaronj1335 committed Mar 22, 2013
1 parent 104a605 commit 93c7009
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/powergrid.js
Expand Up @@ -472,7 +472,7 @@ define([
// first just get a list of all the changes that need to happen
if (!opts.dontUnselectOthers && !opts.selectTo) {
_.each(models, function(m) {
if (selectModels.indexOf(m) < 0 && m.get(a)) {
if (_.indexOf(selectModels, m) < 0 && m.get(a)) {
changes.push({model: m, action: 'del'});
}
});
Expand Down

0 comments on commit 93c7009

Please sign in to comment.