Skip to content

Commit 0a54ed6

Browse files
committed
added bailout to updateQueryData if patches is empty
1 parent 20df6f0 commit 0a54ed6

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)