Skip to content

Commit

Permalink
Fixup editEntityRecord dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Jan 18, 2021
1 parent d3eb6d2 commit 5d48528
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core-data/src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export const editEntityRecord = (
recordId,
edits,
options = {}
) => ( { select } ) => {
) => ( { select, dispatch } ) => {
const entity = select.getEntity( kind, name );
if ( ! entity ) {
throw new Error(
Expand Down Expand Up @@ -262,7 +262,7 @@ export const editEntityRecord = (
}, {} ),
transientEdits,
};
return {
dispatch( {
type: 'EDIT_ENTITY_RECORD',
...edit,
meta: {
Expand All @@ -275,7 +275,7 @@ export const editEntityRecord = (
}, {} ),
},
},
};
} );
};

/**
Expand Down

0 comments on commit 5d48528

Please sign in to comment.