@duet3d/objectmodel 3.5.0-beta.12 → 3.5.0-beta.13
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/dist/ModelObject.js +8 -0
- package/package.json +1 -1
package/dist/ModelObject.js
CHANGED
|
@@ -70,6 +70,10 @@ class ModelObject {
|
|
|
70
70
|
prop.push(value[i]);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
+
else if (value === null) {
|
|
74
|
+
// Arrays may be assignable to null
|
|
75
|
+
this[ownKey] = value;
|
|
76
|
+
}
|
|
73
77
|
else if (process.env.NODE_ENV !== "production") {
|
|
74
78
|
console.warn(`Model array ${key} could not be changed because the target type ${typeof value} is invalid`);
|
|
75
79
|
}
|
|
@@ -89,6 +93,10 @@ class ModelObject {
|
|
|
89
93
|
}
|
|
90
94
|
}
|
|
91
95
|
}
|
|
96
|
+
else if (value === null) {
|
|
97
|
+
// Sets may be assignable to null
|
|
98
|
+
this[ownKey] = value;
|
|
99
|
+
}
|
|
92
100
|
else if (process.env.NODE_ENV !== "production") {
|
|
93
101
|
console.warn(`Model set ${key} could not be changed because the target type ${typeof value} is invalid`);
|
|
94
102
|
}
|