@colyseus/schema 3.0.0-alpha.44 → 3.0.0-alpha.45
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 +4 -4
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.mjs +4 -4
- package/build/esm/index.mjs.map +1 -1
- package/build/umd/index.js +4 -4
- package/lib/encoder/ChangeTree.js +4 -4
- package/lib/encoder/ChangeTree.js.map +1 -1
- package/package.json +1 -1
- package/src/encoder/ChangeTree.ts +4 -4
package/build/cjs/index.js
CHANGED
|
@@ -1340,16 +1340,16 @@ class ChangeTree {
|
|
|
1340
1340
|
return;
|
|
1341
1341
|
}
|
|
1342
1342
|
// ArraySchema | MapSchema - get the child type
|
|
1343
|
-
const
|
|
1344
|
-
? this.ref
|
|
1345
|
-
:
|
|
1343
|
+
const refType = Metadata.isValidInstance(this.ref)
|
|
1344
|
+
? this.ref.constructor
|
|
1345
|
+
: this.ref[$childType];
|
|
1346
1346
|
if (!Metadata.isValidInstance(parent)) {
|
|
1347
1347
|
const parentChangeTree = parent[$changes];
|
|
1348
1348
|
parent = parentChangeTree.parent;
|
|
1349
1349
|
parentIndex = parentChangeTree.parentIndex;
|
|
1350
1350
|
}
|
|
1351
1351
|
const parentConstructor = parent.constructor;
|
|
1352
|
-
let key = `${this.root.types.getTypeId(
|
|
1352
|
+
let key = `${this.root.types.getTypeId(refType)}`;
|
|
1353
1353
|
if (parentConstructor) {
|
|
1354
1354
|
key += `-${this.root.types.schemas.get(parentConstructor)}`;
|
|
1355
1355
|
}
|