From 33e52af6410f001140c0ea3ea2a928df02ac9428 Mon Sep 17 00:00:00 2001 From: sejas Date: Thu, 11 Jul 2024 20:41:33 +0100 Subject: [PATCH] Check if callback options is undefined --- packages/editor/src/components/post-actions/actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/components/post-actions/actions.js b/packages/editor/src/components/post-actions/actions.js index fe45257866972..e8e33b9d61e69 100644 --- a/packages/editor/src/components/post-actions/actions.js +++ b/packages/editor/src/components/post-actions/actions.js @@ -947,7 +947,7 @@ export function usePostActions( { postType, onActionPerformed, context } ) { existingCallback( items, { ...argsObject, onActionPerformed: ( _items ) => { - if ( argsObject.onActionPerformed ) { + if ( argsObject?.onActionPerformed ) { argsObject.onActionPerformed( _items ); } onActionPerformed(