Skip to content

Commit

Permalink
fix: missing stale in subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
bill-min committed Jun 1, 2024
1 parent 2306139 commit 6db3cd4
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,15 @@ class {
requestPolicy: this.input.requestPolicy,
...options,
}),
subscribe(({ data, error }) => {
subscribe(({ data, error, stale }) => {
this.stopTimeout();
this.state.data = data;
this.state.error = error;
this.state.fetching = false;
if (stale) {
this.state.fetching = true;
} else {
this.state.fetching = false;
}
})
).unsubscribe;
}
Expand Down

0 comments on commit 6db3cd4

Please sign in to comment.