@duet3d/objectmodel 3.5.0-b2 → 3.5.0-b3

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.
@@ -57,6 +57,11 @@ class ModelDictionary extends Map {
57
57
  if (jsonElement === null) {
58
58
  this.clear();
59
59
  }
60
+ else if (jsonElement instanceof Map) {
61
+ for (const [key, value] of jsonElement.entries()) {
62
+ this.set(key, value);
63
+ }
64
+ }
60
65
  else {
61
66
  for (const [key, value] of Object.entries(jsonElement)) {
62
67
  this.set(key, value);
@@ -145,6 +145,14 @@ class ModelObject {
145
145
  console.warn(`Incompatible function target type ${typeof value} for property ${key}`);
146
146
  }
147
147
  }
148
+ else if (propType === "object") {
149
+ if (typeof value === "object") {
150
+ this[ownKey] = value;
151
+ }
152
+ else if (process.env.NODE_ENV !== "production") {
153
+ console.warn(`Incompatible object target type ${typeof value} for property ${key}`);
154
+ }
155
+ }
148
156
  else if (process.env.NODE_ENV !== "production") {
149
157
  console.warn(`Incompatible type ${propType} for property ${key} (${typeof value})`);
150
158
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duet3d/objectmodel",
3
- "version": "3.5.0-b2",
3
+ "version": "3.5.0-b3",
4
4
  "description": "TypeScript implementation of the Duet3D Object Model",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",