@colyseus/schema 2.0.3 → 2.0.4

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.
@@ -2880,7 +2880,9 @@ class Schema {
2880
2880
  }
2881
2881
  }
2882
2882
  try {
2883
- $callbacks[change.op]?.forEach(callback => callback(change.value, change.previousValue));
2883
+ if ($callbacks.hasOwnProperty(change.field)) {
2884
+ $callbacks[change.field]?.forEach((callback) => callback(change.value, change.previousValue));
2885
+ }
2884
2886
  }
2885
2887
  catch (e) {
2886
2888
  Schema.onError(e);