mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-28 00:18:45 +03:00
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:
parent
be0eec6716
commit
07a7956eda
@ -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;
|
||||||
}
|
}
|
||||||
|
8
src/ua-parser.min.js
vendored
8
src/ua-parser.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user