Merge pull request #547 from sunny-mwx/patch-1

Fix enumerize loop to only check its own properties
This commit is contained in:
Faisal Salman 2021-10-26 17:51:31 +07:00 committed by GitHub
commit 157af1e2f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,7 @@
}, },
enumerize = function (arr) { enumerize = function (arr) {
var enums = {}; var enums = {};
for (var i in arr) { for (var i=0; i<arr.length; i++) {
enums[arr[i].toUpperCase()] = arr[i]; enums[arr[i].toUpperCase()] = arr[i];
} }
return enums; return enums;