Skip to content

Commit

Permalink
fix: validate data for onClose function
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoa committed Feb 10, 2025
1 parent 2a96990 commit 9b2be97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/library-authoring/add-content/AddContentContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ const AddContentContainer = () => {
const suportedEditorTypes = Object.values(blockTypes);
if (suportedEditorTypes.includes(blockType)) {
// linkComponent on editor close.
openComponentEditor('', (data) => linkComponent(data.id), blockType);
openComponentEditor('', (data) => data && linkComponent(data.id), blockType);
} else {
createBlockMutation.mutateAsync({
libraryId,
Expand Down

0 comments on commit 9b2be97

Please sign in to comment.