regression fix: implied global 'i' in _.indexOf() -- thanks to Sveinung Rosaker.

This commit is contained in:
Jeremy Ashkenas
2009-11-14 08:31:42 -05:00
parent 80939448a7
commit b932867dec
2 changed files with 2 additions and 2 deletions

2
underscore-min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -293,7 +293,7 @@
// item in an array, or -1 if the item is not included in the array.
_.indexOf = function(array, item) {
if (array.indexOf) return array.indexOf(item);
for (i=0, l=array.length; i<l; i++) if (array[i] === item) return i;
for (var i=0, l=array.length; i<l; i++) if (array[i] === item) return i;
return -1;
};