Skip to content

Commit

Permalink
Add a safeguard
Browse files Browse the repository at this point in the history
Signed-off-by: Zvonimir Fras <[email protected]>
  • Loading branch information
zvonimirfras committed Jan 12, 2024
1 parent db26259 commit 73ef46f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/components/fragment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ export const Fragment = ({ fragment, setFragment, outline }: any) => {
// ///////////////////////////////////////////////
if (componentObj.componentsCollection) {
// our component belongs to one of the custom components collections
const customComponentsCollection =
globalState.customComponentsCollections?.find((ccc: any) => ccc.name === componentObj.componentsCollection);
const customComponentsCollection = Array.isArray(globalState.customComponentsCollections)
&& globalState.customComponentsCollections?.find((ccc: any) => ccc.name === componentObj.componentsCollection);
if (customComponentsCollection) {
const customComponent = customComponentsCollection.components.find((cc: any) => cc.type === componentObj.type);

Expand Down

0 comments on commit 73ef46f

Please sign in to comment.