@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.
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- require('util');
4
-
5
3
  const SWITCH_TO_STRUCTURE = 255; // (decoding collides with DELETE_AND_ADD + fieldIndex = 63)
6
4
  const TYPE_ID = 213;
7
5
  /**
@@ -3133,6 +3131,10 @@ function dumpChanges(schema) {
3133
3131
  };
3134
3132
  // for (const refId in $root.changes) {
3135
3133
  $root.changes.forEach(changeTree => {
3134
+ // skip if ChangeTree is undefined
3135
+ if (changeTree === undefined) {
3136
+ return;
3137
+ }
3136
3138
  const changes = changeTree.indexedOperations;
3137
3139
  dump.refs.push(`refId#${changeTree.refId}`);
3138
3140
  for (const index in changes) {