Skip to content

Commit

Permalink
Check if callback options is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
sejas committed Jul 11, 2024
1 parent e88f8be commit 33e52af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/editor/src/components/post-actions/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 33e52af

Please sign in to comment.