Skip to content

Commit

Permalink
Fixes iterable (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
hbcarlos authored Dec 19, 2022
1 parent e227097 commit 0652430
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,9 @@ export class JupyterCadDoc

addObjects(value: Array<IJCadObject>): 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))]);
});
});
}

Expand Down

0 comments on commit 0652430

Please sign in to comment.