Skip to content

Commit

Permalink
fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasJ authored and markerikson committed Aug 27, 2022
1 parent 36feac5 commit bac1e03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/toolkit/src/query/core/buildThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export function buildThunks<
api.endpoints[endpointName] as ApiEndpointQuery<any, any>
).select(args)(getState())
let ret: PatchCollection = {
cacheEntryFound: true,
cacheEntryFound: false,
patches: [],
inversePatches: [],
undo: () =>
Expand All @@ -254,7 +254,7 @@ export function buildThunks<
return ret
}
if ('data' in currentState) {
ret.cacheEntryFound = false
ret.cacheEntryFound = true
if (isDraftable(currentState.data)) {
const [, patches, inversePatches] = produceWithPatches(
currentState.data,
Expand Down

0 comments on commit bac1e03

Please sign in to comment.