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