@duet3d/objectmodel 3.5.0-rc.17 → 3.5.0-rc.18
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 +0 -21
- package/package.json +1 -1
package/dist/ModelObject.js
CHANGED
|
@@ -101,27 +101,6 @@ class ModelObject {
|
|
|
101
101
|
console.warn(`Model set ${key} could not be changed because the target type ${typeof value} is invalid`);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
else if (prop instanceof Map) {
|
|
105
|
-
if (value instanceof Object) {
|
|
106
|
-
// Remove deleted items
|
|
107
|
-
for (let item in prop) {
|
|
108
|
-
if (!(item in value)) {
|
|
109
|
-
prop.delete(item);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
// Add new items
|
|
113
|
-
for (let item in value) {
|
|
114
|
-
prop.set(item, value[item]);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
else if (value === null) {
|
|
118
|
-
// Sets may be assignable to null
|
|
119
|
-
this[ownKey] = value;
|
|
120
|
-
}
|
|
121
|
-
else if (process.env.NODE_ENV !== "production") {
|
|
122
|
-
console.warn(`Model map ${key} could not be changed because the target type ${typeof value} is invalid`);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
104
|
else if (prop === null || value === null) {
|
|
126
105
|
// Unfortunately we cannot do type checks during runtime without excessive extra work and possibly
|
|
127
106
|
// third-party libraries, so skip them for null values until there is a better solution.
|