Skip to content

Commit

Permalink
fix: remove for-in loop to prevent errors when Array has additional e…
Browse files Browse the repository at this point in the history
…numerable properties (#3)
  • Loading branch information
MarcPorciuncula authored Nov 24, 2021
1 parent 5c745cc commit 59cc613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
},
enumerize = function (arr) {
var enums = {};
for (var i in arr) {
for (var i = 0; i < arr.length; i++) {
enums[arr[i].toUpperCase()] = arr[i];
}
return enums;
Expand Down

0 comments on commit 59cc613

Please sign in to comment.