From e0afea285ec8fad82e34520ec0c63b34cc3eb8d1 Mon Sep 17 00:00:00 2001
From: Antonio Sejas <antonio@sejas.es>
Date: Fri, 12 Jul 2024 12:59:00 +0100
Subject: [PATCH] Check if callback options is undefined (#63460)

Co-authored-by: sejas <antoniosejas@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
---
 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 484b1e503c1e01..e94d7a647f1460 100644
--- a/packages/editor/src/components/post-actions/actions.js
+++ b/packages/editor/src/components/post-actions/actions.js
@@ -946,7 +946,7 @@ export function usePostActions( { postType, onActionPerformed, context } ) {
 							existingCallback( items, {
 								...argsObject,
 								onActionPerformed: ( _items ) => {
-									if ( argsObject.onActionPerformed ) {
+									if ( argsObject?.onActionPerformed ) {
 										argsObject.onActionPerformed( _items );
 									}
 									onActionPerformed(