Skip to content

Commit

Permalink
Merge pull request #4211 from riqts/bil-out-of-updateQueryData
Browse files Browse the repository at this point in the history
added bailout to updateQueryData if patches is empty
  • Loading branch information
EskiMojo14 authored Feb 15, 2024
2 parents 20df6f0 + 0a54ed6 commit 87f045c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/toolkit/src/query/core/buildThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ export function buildThunks<
}
}

if (ret.patches.length === 0) {
return ret
}

dispatch(
api.util.patchQueryData(
endpointName,
Expand Down

0 comments on commit 87f045c

Please sign in to comment.