@colyseus/schema 3.0.40 → 3.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +8 -1
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +8 -1
- package/build/esm/index.mjs.map +1 -1
- package/build/umd/index.js +8 -1
- package/lib/decoder/Decoder.js +1 -1
- package/lib/decoder/Decoder.js.map +1 -1
- package/lib/encoder/StateView.js +7 -0
- package/lib/encoder/StateView.js.map +1 -1
- package/package.json +1 -1
- package/src/decoder/Decoder.ts +1 -1
- package/src/encoder/StateView.ts +8 -0
package/build/cjs/index.js
CHANGED
|
@@ -4277,7 +4277,7 @@ class Decoder {
|
|
|
4277
4277
|
// Trying to access a reference that haven't been decoded yet.
|
|
4278
4278
|
//
|
|
4279
4279
|
if (!nextRef) {
|
|
4280
|
-
console.error(`"refId" not found: ${nextRefId}`, { previousRef:
|
|
4280
|
+
console.error(`"refId" not found: ${nextRefId}`, { previousRef: ref, previousRefId: this.currentRefId });
|
|
4281
4281
|
console.warn("Please report this to the developers. All refIds =>");
|
|
4282
4282
|
console.warn(Schema.debugRefIdsDecoder(this));
|
|
4283
4283
|
this.skipCurrentStructure(bytes, it, totalBytes);
|
|
@@ -5018,6 +5018,13 @@ class StateView {
|
|
|
5018
5018
|
changes = {};
|
|
5019
5019
|
this.changes.set(parentChangeTree.refId, changes);
|
|
5020
5020
|
}
|
|
5021
|
+
else if (changes[changeTree.parentIndex] === exports.OPERATION.ADD) {
|
|
5022
|
+
//
|
|
5023
|
+
// SAME PATCH ADD + REMOVE:
|
|
5024
|
+
// The 'changes' of deleted structure should be ignored.
|
|
5025
|
+
//
|
|
5026
|
+
this.changes.delete(changeTree.refId);
|
|
5027
|
+
}
|
|
5021
5028
|
// DELETE / DELETE BY REF ID
|
|
5022
5029
|
changes[changeTree.parentIndex] = exports.OPERATION.DELETE;
|
|
5023
5030
|
// Remove child schema from visible set
|