diff --git a/src/model.ts b/src/model.ts index f5a147c5..ce308ebf 100644 --- a/src/model.ts +++ b/src/model.ts @@ -284,8 +284,9 @@ export class JupyterCadDoc addObjects(value: Array): void { this.transact(() => { - const objs = value.map(obj => new Y.Map(Object.create(obj))); - this._objects.push(objs); + value.map(obj => { + this._objects.push([new Y.Map(Object.entries(obj))]); + }); }); }