From 41a2b5a86e9527f2236256c1a6d22fff7a901ff2 Mon Sep 17 00:00:00 2001 From: Marc Porciuncula Date: Tue, 5 Oct 2021 20:45:04 +1100 Subject: [PATCH] fix: remove for-in loop to prevent errors when Array has additional enumerable properties --- src/ua-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ua-parser.js b/src/ua-parser.js index 4f8afde2..ae050f31 100755 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -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;