mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-10-02 07:32:07 -04:00
Fix error handling using undefined variables
This commit is contained in:
parent
35c980465e
commit
e260f15163
@ -67,7 +67,7 @@ function writeArray(value, buffer, offset, typeArgs, rootNode) {
|
||||
tryCatch(() => {
|
||||
offset = this.write(value[index], buffer, offset, typeArgs.type, rootNode);
|
||||
}, (e) => {
|
||||
addErrorField(e, i);
|
||||
addErrorField(e, index);
|
||||
throw e;
|
||||
});
|
||||
}
|
||||
@ -89,7 +89,7 @@ function sizeOfArray(value, typeArgs, rootNode) {
|
||||
tryCatch(() => {
|
||||
size += this.sizeOf(value[index], typeArgs.type, rootNode);
|
||||
}, (e) => {
|
||||
addErrorField(e, i);
|
||||
addErrorField(e, index);
|
||||
throw e;
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user