Skip to content

Commit 87f045c

Browse files
authored
Merge pull request #4211 from riqts/bil-out-of-updateQueryData
added bailout to updateQueryData if patches is empty
2 parents 20df6f0 + 0a54ed6 commit 87f045c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/toolkit/src/query/core/buildThunks.ts

+4
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ export function buildThunks<
321321
}
322322
}
323323

324+
if (ret.patches.length === 0) {
325+
return ret
326+
}
327+
324328
dispatch(
325329
api.util.patchQueryData(
326330
endpointName,

0 commit comments

Comments
 (0)