@colyseus/schema 3.0.60 → 3.0.62
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 +3 -0
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +3 -0
- package/build/esm/index.mjs.map +1 -1
- package/build/umd/index.js +3 -0
- package/lib/decoder/strategy/StateCallbacks.d.ts +8 -1
- package/lib/decoder/strategy/StateCallbacks.js.map +1 -1
- package/lib/types/custom/MapSchema.js +3 -0
- 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 +4 -0
package/build/cjs/index.js
CHANGED
|
@@ -2746,6 +2746,9 @@ class MapSchema {
|
|
|
2746
2746
|
return this.$items.get(key);
|
|
2747
2747
|
}
|
|
2748
2748
|
delete(key) {
|
|
2749
|
+
if (!this.$items.has(key)) {
|
|
2750
|
+
return false;
|
|
2751
|
+
}
|
|
2749
2752
|
const index = this[$changes].indexes[key];
|
|
2750
2753
|
this.deletedItems[index] = this[$changes].delete(index);
|
|
2751
2754
|
return this.$items.delete(key);
|