Skip to content

Commit

Permalink
fix: useMutation does not await non-promise
Browse files Browse the repository at this point in the history
Fixes #504
  • Loading branch information
tannerlinsley committed Jun 2, 2020
1 parent 584932e commit 4f56c31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useMutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })

Expand Down

0 comments on commit 4f56c31

Please sign in to comment.