@colyseus/schema 3.0.0-alpha.29 → 3.0.0-alpha.30

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.
@@ -3503,7 +3503,7 @@ class Encoder {
3503
3503
  }
3504
3504
  // skip root `refId` if it's the first change tree
3505
3505
  // (unless it "hasView", which will need to revisit the root)
3506
- if (hasView || changeTree !== rootChangeTree) {
3506
+ if (hasView || it.offset > initialOffset || changeTree !== rootChangeTree) {
3507
3507
  buffer[it.offset++] = SWITCH_TO_STRUCTURE & 255;
3508
3508
  number$1(buffer, changeTree.refId, it);
3509
3509
  }