From 4f56c31ba5bf898805fba4f48479ebc6a2b93ff6 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Mon, 1 Jun 2020 22:44:47 -0600 Subject: [PATCH] fix: useMutation does not await non-promise Fixes #504 --- src/useMutation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/useMutation.js b/src/useMutation.js index 6b036ed7d1..c6aa7007fa 100644 --- a/src/useMutation.js +++ b/src/useMutation.js @@ -78,7 +78,7 @@ export function useMutation(mutationFn, config = {}) { const mutationId = uid() latestMutationRef.current = mutationId - const isLatest = async () => latestMutationRef.current === mutationId + const isLatest = () => latestMutationRef.current === mutationId dispatch({ type: actionLoading })