diff --git a/packages/field-kit/src/entities/index.js b/packages/field-kit/src/entities/index.js index 36366161..93e9984e 100644 --- a/packages/field-kit/src/entities/index.js +++ b/packages/field-kit/src/entities/index.js @@ -274,7 +274,7 @@ export default function useEntities(options = {}) { const { queue, state, transactions } = revision; queue.push(() => { updateStatus(STATUS_IN_PROGRESS); - return getRecords('entities', _entity, id).then(([, data]) => { + return getRecords('entities', _entity, id).then((data) => { if (data) emit(state, data); const syncOptions = { cache: asArray(data), filter: { id, type } }; return syncEntities(shortName, syncOptions) diff --git a/packages/field-kit/src/idb/index.js b/packages/field-kit/src/idb/index.js index f2c0e082..e2c376a2 100644 --- a/packages/field-kit/src/idb/index.js +++ b/packages/field-kit/src/idb/index.js @@ -65,7 +65,7 @@ export function getRecords(dbName, storeName, query) { if (typeof query === 'function') { return cursorQuery(store, query); } - return getOneByPrimaryKey(query); + return getOneByPrimaryKey(query).then(([, data]) => data); }); }