Skip to content

Commit

Permalink
use a better key name
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasJ authored and markerikson committed Aug 27, 2022
1 parent 525b52a commit 36feac5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/toolkit/src/query/core/buildThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export type PatchCollection = {
*
* If there was no data in the cache no update operation is performed
*/
emptyCache: boolean
cacheEntryFound: boolean
/**
* An `immer` Patch describing the cache update.
*/
Expand Down Expand Up @@ -242,7 +242,7 @@ export function buildThunks<
api.endpoints[endpointName] as ApiEndpointQuery<any, any>
).select(args)(getState())
let ret: PatchCollection = {
emptyCache: true,
cacheEntryFound: true,
patches: [],
inversePatches: [],
undo: () =>
Expand All @@ -254,7 +254,7 @@ export function buildThunks<
return ret
}
if ('data' in currentState) {
ret.emptyCache = false
ret.cacheEntryFound = false
if (isDraftable(currentState.data)) {
const [, patches, inversePatches] = produceWithPatches(
currentState.data,
Expand Down

0 comments on commit 36feac5

Please sign in to comment.