Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix: normalize array inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
marionebl committed Sep 10, 2018
1 parent 9ea7e8e commit 1ee39fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/model/element/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ export class Element {
contentIds: serialized.contentIds,
open: serialized.open,
forcedOpen: serialized.forcedOpen,
properties: (serialized.properties || []).map(p => ElementProperty.from(p, context)),
properties: Array.from(serialized.properties || []).map(p =>
ElementProperty.from(p, context)
),
role: deserializeRole(serialized.role),
selected: serialized.selected
},
Expand Down
4 changes: 2 additions & 2 deletions src/model/user-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ export class UserStore {
: undefined,
enhancer: UserStoreEnhancer.from(serialized.enhancer),
id: serialized.id,
properties: (serialized.properties || []).map(p => UserStoreProperty.from(p)),
references: (serialized.references || []).map(r => UserStoreReference.from(r))
properties: Array.from(serialized.properties || []).map(p => UserStoreProperty.from(p)),
references: Array.from(serialized.references || []).map(r => UserStoreReference.from(r))
});
}

Expand Down

0 comments on commit 1ee39fe

Please sign in to comment.