Skip to content

Commit

Permalink
Fix authenticated query
Browse files Browse the repository at this point in the history
  • Loading branch information
vhande committed Nov 19, 2024
1 parent 7012e3c commit 0becf9b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hooks/api/authenticated-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ const isDuplicateMutation = (

const latestMutation = mutations.slice(-2)[0];

// If the latest mutation was unsuccessful, we don't want to trigger a false positive.
if (latestMutation.state.error) {
return false;
}

return (
mutations.length > 1 && isEqual(latestMutation.options.variables, variables)
);
Expand Down

0 comments on commit 0becf9b

Please sign in to comment.