Skip to content

Commit

Permalink
Use resolveSelect instead of select in saveEntityRecord (#34584)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamziel authored Sep 7, 2021
1 parent 5c5fd35 commit a1151b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core-data/src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export const saveEntityRecord = (
name,
record,
{ isAutosave = false, __unstableFetch = triggerFetch } = {}
) => async ( { select, dispatch } ) => {
) => async ( { select, resolveSelect, dispatch } ) => {
const entities = await dispatch( getKindEntities( kind ) );
const entity = find( entities, { kind, name } );
if ( ! entity ) {
Expand Down Expand Up @@ -410,7 +410,7 @@ export const saveEntityRecord = (
// so the client just sends and receives objects.
const currentUser = select.getCurrentUser();
const currentUserId = currentUser ? currentUser.id : undefined;
const autosavePost = select.getAutosave(
const autosavePost = resolveSelect.getAutosave(
persistedRecord.type,
persistedRecord.id,
currentUserId
Expand Down

0 comments on commit a1151b6

Please sign in to comment.