@colyseus/schema 2.0.21 → 2.0.23

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.
@@ -544,6 +544,9 @@ class ArraySchema {
544
544
  removedItems.push(this.$items.get(indexes[i]));
545
545
  this.$deleteAt(indexes[i]);
546
546
  }
547
+ for (let i = 0; i < items.length; i++) {
548
+ this.setAt(start + i, items[i]);
549
+ }
547
550
  return removedItems;
548
551
  }
549
552
  /**
@@ -3147,7 +3150,7 @@ class Reflection extends Schema {
3147
3150
  }
3148
3151
  reflection.types.push(currentType);
3149
3152
  };
3150
- const types = rootSchemaType._context.types;
3153
+ const types = rootSchemaType._context?.types;
3151
3154
  for (let typeid in types) {
3152
3155
  const type = new ReflectionType();
3153
3156
  type.id = Number(typeid);