@colyseus/schema 3.0.34 → 3.0.35

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.
@@ -4978,7 +4978,7 @@ class StateView {
4978
4978
  if (tag === DEFAULT_VIEW_TAG) {
4979
4979
  // parent is collection (Map/Array)
4980
4980
  const parent = changeTree.parent;
4981
- if (!Metadata.isValidInstance(parent)) {
4981
+ if (!Metadata.isValidInstance(parent) && changeTree.isFiltered) {
4982
4982
  const parentChangeTree = parent[$changes];
4983
4983
  let changes = this.changes.get(parentChangeTree.refId);
4984
4984
  if (changes === undefined) {
@@ -4990,7 +4990,7 @@ class StateView {
4990
4990
  }
4991
4991
  else {
4992
4992
  // delete all "tagged" properties.
4993
- metadata?.[$viewFieldIndexes].forEach((index) => changes[index] = OPERATION.DELETE);
4993
+ metadata?.[$viewFieldIndexes]?.forEach((index) => changes[index] = OPERATION.DELETE);
4994
4994
  }
4995
4995
  }
4996
4996
  else {