Skip to content

Commit 7b80e21

Browse files
committed
fix logging previous known 'ref' when 'refId not found' occurs.
1 parent 7b9ba63 commit 7b80e21

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@colyseus/schema",
3-
"version": "3.0.40",
3+
"version": "3.0.41",
44
"description": "Binary state serializer with delta encoding for games",
55
"bin": {
66
"schema-codegen": "bin/schema-codegen",

src/decoder/Decoder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class Decoder<T extends Schema = any> {
6565
// Trying to access a reference that haven't been decoded yet.
6666
//
6767
if (!nextRef) {
68-
console.error(`"refId" not found: ${nextRefId}`, { previousRef: this, previousRefId: this.currentRefId });
68+
console.error(`"refId" not found: ${nextRefId}`, { previousRef: ref, previousRefId: this.currentRefId });
6969
console.warn("Please report this to the developers. All refIds =>");
7070
console.warn(Schema.debugRefIdsDecoder(this));
7171
this.skipCurrentStructure(bytes, it, totalBytes);

0 commit comments

Comments
 (0)