Skip to content

Commit

Permalink
Fix: Permanently delete post action does not calls onActionPerformed. (
Browse files Browse the repository at this point in the history
…#63121)

Co-authored-by: jorgefilipecosta <[email protected]>
  • Loading branch information
jorgefilipecosta and jorgefilipecosta authored Jul 4, 2024
1 parent bd8a937 commit d51d7e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/editor/src/components/post-actions/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ const permanentlyDeletePostAction = {
isEligible( { status } ) {
return status === 'trash';
},
async callback( posts, { registry } ) {
async callback( posts, { registry, onActionPerformed } ) {
const { createSuccessNotice, createErrorNotice } =
registry.dispatch( noticesStore );
const { deleteEntityRecord } = registry.dispatch( coreStore );
Expand Down Expand Up @@ -307,6 +307,7 @@ const permanentlyDeletePostAction = {
type: 'snackbar',
id: 'permanently-delete-post-action',
} );
onActionPerformed?.( posts );
} else {
// If there was at lease one failure.
let errorMessage;
Expand Down

1 comment on commit d51d7e5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in d51d7e5.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9793487416
📝 Reported issues:

Please sign in to comment.