@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.
- package/build/cjs/index.js +9 -1
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +4 -1
- package/build/esm/index.mjs.map +1 -1
- package/build/umd/index.js +9 -1
- package/lib/Reflection.js +1 -1
- package/lib/Reflection.js.map +1 -1
- package/lib/types/ArraySchema.js +3 -0
- package/lib/types/ArraySchema.js.map +1 -1
- package/package.json +1 -1
- package/src/Reflection.ts +1 -1
- package/src/types/ArraySchema.ts +4 -0
package/build/esm/index.mjs
CHANGED
|
@@ -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
|
|
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);
|