Change 'for..in' loop to for loop.

The 'for..in' loop caused problems when the array was extended with
more methods (like map), e.g. by html5shiv in old IEs.
This commit is contained in:
Erik Hesselink 2013-05-17 14:05:21 +02:00
parent be0eec6716
commit 07a7956eda
2 changed files with 2 additions and 8 deletions

View File

@ -121,7 +121,7 @@
for (var i in map) { for (var i in map) {
// check if array // check if array
if (typeof(map[i]) === OBJ_TYPE && map[i].length > 0) { if (typeof(map[i]) === OBJ_TYPE && map[i].length > 0) {
for (var j in map[i]) { for (var j = 0; j < map[i].length; j++) {
if (util.has(map[i][j], str)) { if (util.has(map[i][j], str)) {
return (i === UNKNOWN) ? undefined : i; return (i === UNKNOWN) ? undefined : i;
} }

File diff suppressed because one or more lines are too long