Skip to content

Commit

Permalink
Update resetPublications action.
Browse files Browse the repository at this point in the history
  • Loading branch information
nfmohit committed Aug 7, 2024
1 parent 62dabda commit 67ea770
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,21 +214,21 @@ const baseActions = {
* Resets the publications data in the store.
*
* @since n.e.x.t
*
* @return {Object} The dispatched action results.
*/
*resetPublications() {
const registry = yield commonActions.getRegistry();

yield errorStoreActions.clearErrors( 'getPublications' );

yield commonActions.await(
registry
.dispatch( MODULES_READER_REVENUE_MANAGER )
.invalidateResolutionForStoreSelector( 'getPublications' )
);

yield {
type: 'RESET_PUBLICATIONS',
};

yield errorStoreActions.clearErrors( 'getPublications' );

return registry
.dispatch( MODULES_READER_REVENUE_MANAGER )
.invalidateResolutionForStoreSelector( 'getPublications' );
},

/**
Expand Down

0 comments on commit 67ea770

Please sign in to comment.