Skip to content

Commit c477a56

Browse files
preserve compatibility. Hooks should not report isLoading if the query changed.
1 parent 21cc852 commit c477a56

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/common/src/client/watched/processors/AbstractQueryProcessor.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,9 @@ export abstract class AbstractQueryProcessor<
8585
async updateSettings(settings: Settings) {
8686
await this.initialized;
8787

88-
if (!this.state.isLoading) {
88+
if (!this.state.isFetching && this.reportFetching) {
8989
await this.updateState({
90-
isLoading: true,
91-
isFetching: this.reportFetching ? true : false
90+
isFetching: true
9291
});
9392
}
9493

packages/web/tests/watch.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,12 @@ describe('Watch Tests', { sequential: true }, () => {
521521
})
522522
});
523523

524-
expect(watch.state.isLoading).true;
524+
expect(watch.state.isLoading).false;
525+
expect(watch.state.isFetching).true;
525526

526527
await vi.waitFor(
527528
() => {
528-
expect(watch.state.isLoading).false;
529+
expect(watch.state.isFetching).false;
529530
},
530531
{ timeout: 1000 }
531532
);

0 commit comments

Comments
 (0)