@colyseus/schema 3.0.59 → 3.0.61
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 +7 -2
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +7 -2
- package/build/esm/index.mjs.map +1 -1
- package/build/umd/index.js +7 -2
- package/lib/decoder/strategy/StateCallbacks.d.ts +8 -1
- package/lib/decoder/strategy/StateCallbacks.js.map +1 -1
- package/lib/types/custom/MapSchema.js +7 -2
- package/lib/types/custom/MapSchema.js.map +1 -1
- package/package.json +1 -1
- package/src/decoder/strategy/StateCallbacks.ts +8 -1
- package/src/types/custom/MapSchema.ts +7 -2
package/build/esm/index.mjs
CHANGED
|
@@ -2797,10 +2797,15 @@ class MapSchema {
|
|
|
2797
2797
|
}
|
|
2798
2798
|
[$onEncodeEnd]() {
|
|
2799
2799
|
const changeTree = this[$changes];
|
|
2800
|
-
// cleanup changeTree.indexes
|
|
2800
|
+
// - cleanup changeTree.indexes
|
|
2801
|
+
// - cleanup $indexes
|
|
2801
2802
|
for (const indexStr in this.deletedItems) {
|
|
2802
|
-
const
|
|
2803
|
+
const index = parseInt(indexStr);
|
|
2804
|
+
const key = this.$indexes.get(index);
|
|
2805
|
+
// TODO: refactor this.
|
|
2806
|
+
// it shouldn't be necessary to keep track of indexes both on changeTree and on $indexes
|
|
2803
2807
|
delete changeTree.indexes[key];
|
|
2808
|
+
this.$indexes.delete(index);
|
|
2804
2809
|
}
|
|
2805
2810
|
this.deletedItems = {};
|
|
2806
2811
|
}
|