Skip to content

Commit 4f56c31

Browse files
committed
fix: useMutation does not await non-promise
Fixes TanStack#504
1 parent 584932e commit 4f56c31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useMutation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export function useMutation(mutationFn, config = {}) {
7878
const mutationId = uid()
7979
latestMutationRef.current = mutationId
8080

81-
const isLatest = async () => latestMutationRef.current === mutationId
81+
const isLatest = () => latestMutationRef.current === mutationId
8282

8383
dispatch({ type: actionLoading })
8484

0 commit comments

Comments
 (0)