@colyseus/schema 3.0.4 → 3.0.6

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.
@@ -2228,8 +2228,8 @@ class ArraySchema {
2228
2228
  lastIndexOf(searchElement, fromIndex = this.length - 1) {
2229
2229
  return this.items.lastIndexOf(searchElement, fromIndex);
2230
2230
  }
2231
- every(predicate, thisArg) {
2232
- return this.items.every(predicate, thisArg);
2231
+ every(callbackfn, thisArg) {
2232
+ return this.items.every(callbackfn, thisArg);
2233
2233
  }
2234
2234
  /**
2235
2235
  * Determines whether the specified callback function returns true for any element of an array.
@@ -4203,12 +4203,11 @@ class Decoder {
4203
4203
  return new type();
4204
4204
  }
4205
4205
  removeChildRefs(ref, allChanges) {
4206
- const changeTree = ref[$changes];
4207
4206
  const needRemoveRef = typeof (ref[$childType]) !== "string";
4208
- const refId = changeTree.refId;
4207
+ const refId = this.root.refIds.get(ref);
4209
4208
  ref.forEach((value, key) => {
4210
4209
  allChanges.push({
4211
- ref: value,
4210
+ ref: ref,
4212
4211
  refId,
4213
4212
  op: OPERATION.DELETE,
4214
4213
  field: key,