@colyseus/schema 3.0.45 → 3.0.46

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.
@@ -1424,7 +1424,9 @@ class ChangeTree {
1424
1424
  */
1425
1425
  addParent(parent, index) {
1426
1426
  // Check if this parent already exists in the chain
1427
- if (this.hasParent((p, i) => p[$changes] === parent[$changes] && i === index)) {
1427
+ if (this.hasParent((p, _) => p[$changes] === parent[$changes])) {
1428
+ // if (this.hasParent((p, i) => p[$changes] === parent[$changes] && i === index)) {
1429
+ this.parentChain.index = index;
1428
1430
  return;
1429
1431
  }
1430
1432
  this.parentChain = {
@@ -3922,7 +3924,6 @@ class Root {
3922
3924
  }
3923
3925
  remove(changeTree) {
3924
3926
  const refCount = (this.refCount[changeTree.refId]) - 1;
3925
- // console.log("REMOVE", { refId: changeTree.refId, refCount });
3926
3927
  if (refCount <= 0) {
3927
3928
  //
3928
3929
  // Only remove "root" reference if it's the last reference