Skip to content

Commit b82a02b

Browse files
committed
fix: handle empty items in phases on space sync
1 parent ced33d8 commit b82a02b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/syncSpace.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export const filterSpace = space => {
1818
// remove properties in items
1919
// eslint-disable-next-line no-restricted-syntax
2020
for (const phase of filteredSpace.phases) {
21-
phase.items = phase.items.map(item => _.pick(item, SYNC_ITEM_PROPERTIES));
21+
if (!_.isEmpty(phase.items)) {
22+
phase.items = phase.items.map(item => _.pick(item, SYNC_ITEM_PROPERTIES));
23+
}
2224
}
2325

2426
return filteredSpace;

0 commit comments

Comments
 (0)