mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-15 22:52:16 +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:
@@ -121,7 +121,7 @@
|
||||
for (var i in map) {
|
||||
// check if array
|
||||
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)) {
|
||||
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
Reference in New Issue
Block a user