Skip to content

Commit

Permalink
Update state.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock authored Feb 2, 2022
1 parent 69a5fdc commit 25d78a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-urql/src/hooks/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const computeNextState = <T extends Stateish>(
const newState = {
...prevState,
...result,
data: result.data !== undefined ? result.data : prevState.data,
data: result.data !== undefined || result.error ? result.data : prevState.data,
fetching: !!result.fetching,
stale: !!result.stale,
};
Expand Down

0 comments on commit 25d78a9

Please sign in to comment.