@colyseus/schema 3.0.30 → 3.0.32
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 +4 -2
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +4 -2
- package/build/esm/index.mjs.map +1 -1
- package/build/umd/index.js +6 -2
- package/lib/encoder/ChangeTree.js +2 -3
- package/lib/encoder/ChangeTree.js.map +1 -1
- package/lib/utils.js +4 -0
- package/lib/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/encoder/ChangeTree.ts +2 -4
- package/src/utils.ts +3 -0
package/build/esm/index.mjs
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import 'util';
|
|
2
|
-
|
|
3
1
|
const SWITCH_TO_STRUCTURE = 255; // (decoding collides with DELETE_AND_ADD + fieldIndex = 63)
|
|
4
2
|
const TYPE_ID = 213;
|
|
5
3
|
/**
|
|
@@ -3131,6 +3129,10 @@ function dumpChanges(schema) {
|
|
|
3131
3129
|
};
|
|
3132
3130
|
// for (const refId in $root.changes) {
|
|
3133
3131
|
$root.changes.forEach(changeTree => {
|
|
3132
|
+
// skip if ChangeTree is undefined
|
|
3133
|
+
if (changeTree === undefined) {
|
|
3134
|
+
return;
|
|
3135
|
+
}
|
|
3134
3136
|
const changes = changeTree.indexedOperations;
|
|
3135
3137
|
dump.refs.push(`refId#${changeTree.refId}`);
|
|
3136
3138
|
for (const index in changes) {
|