fix: remove for-in loop to prevent errors when Array has additional enumerable properties (#3)

This commit is contained in:
Marc Porciuncula 2021-11-24 11:26:39 +11:00 committed by GitHub
parent 5c745ccec1
commit 59cc613fc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;