Skip to content

Commit

Permalink
simplify bailout logic
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Aug 28, 2022
1 parent d8a8cc7 commit 34bfefd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/toolkit/src/query/core/buildSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ export function buildSlice({
draft,
meta.arg.queryCacheKey,
(substate) => {
if (substate.requestId !== meta.requestId) return
if (
substate.requestId !== meta.requestId &&
!isUpsertQuery(meta.arg)
)
return
const { merge } = definitions[
meta.arg.endpointName
] as QueryDefinition<any, any, any, any>
Expand Down

0 comments on commit 34bfefd

Please sign in to comment.