Skip to content

Commit

Permalink
fix: handle empty items in phases on space sync
Browse files Browse the repository at this point in the history
  • Loading branch information
pyphilia committed Aug 20, 2020
1 parent ced33d8 commit b82a02b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/syncSpace.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export const filterSpace = space => {
// remove properties in items
// eslint-disable-next-line no-restricted-syntax
for (const phase of filteredSpace.phases) {
phase.items = phase.items.map(item => _.pick(item, SYNC_ITEM_PROPERTIES));
if (!_.isEmpty(phase.items)) {
phase.items = phase.items.map(item => _.pick(item, SYNC_ITEM_PROPERTIES));
}
}

return filteredSpace;
Expand Down

0 comments on commit b82a02b

Please sign in to comment.