From 0652430a9eb04b9a7a0d0a2d6a147bd273d75ada Mon Sep 17 00:00:00 2001 From: Carlos Herrero Date: Mon, 19 Dec 2022 14:56:28 +0100 Subject: [PATCH] Fixes iterable (#71) --- src/model.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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))]); + }); }); }