Skip to content

Commit

Permalink
fix(review): check that result networkStatus is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
alessbell committed Oct 26, 2022
1 parent 7ce592e commit e763b92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/react/hooks/useQuery.ts
Expand Up @@ -512,7 +512,8 @@ class InternalState<TData, TVariables> {
this.onError(result.error);
} else if (
result.data &&
previousResult?.networkStatus !== result.networkStatus
previousResult?.networkStatus !== result.networkStatus &&
result.networkStatus === NetworkStatus.ready
) {
this.onCompleted(result.data);
}
Expand Down

0 comments on commit e763b92

Please sign in to comment.