@duet3d/objectmodel 3.5.0-rc.2 → 3.5.0-rc.3
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/ModelCollection.js +3 -0
- package/package.json +1 -1
package/dist/ModelCollection.js
CHANGED
|
@@ -39,6 +39,9 @@ class ModelCollection extends Array {
|
|
|
39
39
|
* @returns Updated instance
|
|
40
40
|
*/
|
|
41
41
|
update(jsonElement) {
|
|
42
|
+
if (jsonElement === null) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
42
45
|
if (!(jsonElement instanceof Array)) {
|
|
43
46
|
throw new Error(`Invalid JSON element type for model collection ${typeof jsonElement}`);
|
|
44
47
|
}
|