@colyseus/schema 3.0.5 → 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,15 +2228,6 @@ class ArraySchema {
2228
2228
  lastIndexOf(searchElement, fromIndex = this.length - 1) {
2229
2229
  return this.items.lastIndexOf(searchElement, fromIndex);
2230
2230
  }
2231
- /**
2232
- * Determines whether all the members of an array satisfy the specified test.
2233
- * @param callbackfn A function that accepts up to three arguments. The every method calls
2234
- * the callbackfn function for each element in the array until the callbackfn returns a value
2235
- * which is coercible to the Boolean value false, or until the end of the array.
2236
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2237
- * If thisArg is omitted, undefined is used as the this value.
2238
- */
2239
- // @ts-ignore
2240
2231
  every(callbackfn, thisArg) {
2241
2232
  return this.items.every(callbackfn, thisArg);
2242
2233
  }
@@ -4212,12 +4203,11 @@ class Decoder {
4212
4203
  return new type();
4213
4204
  }
4214
4205
  removeChildRefs(ref, allChanges) {
4215
- const changeTree = ref[$changes];
4216
4206
  const needRemoveRef = typeof (ref[$childType]) !== "string";
4217
- const refId = changeTree.refId;
4207
+ const refId = this.root.refIds.get(ref);
4218
4208
  ref.forEach((value, key) => {
4219
4209
  allChanges.push({
4220
- ref: value,
4210
+ ref: ref,
4221
4211
  refId,
4222
4212
  op: OPERATION.DELETE,
4223
4213
  field: key,