From 174231c9a3c45084927064185dbbdcdb537a1a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Mon, 6 Sep 2021 15:10:04 +0200 Subject: [PATCH] Use resolveSelect instead of select in saveEntityRecord --- packages/core-data/src/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core-data/src/actions.js b/packages/core-data/src/actions.js index 0cc8bdaa7aefeb..d0d7cd12a75766 100644 --- a/packages/core-data/src/actions.js +++ b/packages/core-data/src/actions.js @@ -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 ) { @@ -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