mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-12-02 03:56:54 -05:00
Use proper for loop in getField, fixes #103
some tools add custom functions to Array, which breaks for/in loops on array.
This commit is contained in:
parent
06ea770355
commit
b8ea176fb7
1 changed files with 1 additions and 1 deletions
|
@ -1180,7 +1180,7 @@ function sizeOfArray(value, typeArgs, rootNode) {
|
|||
function getField(countField, rootNode) {
|
||||
var countFieldArr = countField.split(".");
|
||||
var count = rootNode;
|
||||
for (var index in countFieldArr) {
|
||||
for (var index = 0; index < countFieldArr.length; index++) {
|
||||
count = count[countFieldArr[index]];
|
||||
}
|
||||
return count;
|
||||
|
|
Loading…
Reference in a new issue