Skip to content

Commit

Permalink
Check if callback options is undefined (#63460)
Browse files Browse the repository at this point in the history
Co-authored-by: sejas <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: youknowriad <[email protected]>
  • Loading branch information
4 people authored and andrewserong committed Jul 15, 2024
1 parent 5ce11d9 commit e0afea2
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 @@ -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(
Expand Down

0 comments on commit e0afea2

Please sign in to comment.