Skip to content

Commit

Permalink
Fix export error when custom collections undefined
Browse files Browse the repository at this point in the history
Signed-off-by: Zvonimir Fras <[email protected]>
  • Loading branch information
zvonimirfras committed Dec 4, 2023
1 parent 3760976 commit 9b68e09
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const jsonToTemplate = (json: any, fragments: any[], customComponentsColl
itemsTemplate = json.items.map((item: any) => jsonToTemplate(item, fragments, customComponentsCollections)).join('\n');
}

const activeCollection = customComponentsCollections.find((collection) => collection.name === json.componentsCollection);
const activeCollection = customComponentsCollections?.find((collection) => collection.name === json.componentsCollection);
if (!activeCollection) {
return itemsTemplate;
}
Expand Down

0 comments on commit 9b68e09

Please sign in to comment.