()
| 678 | } |
| 679 | |
| 680 | #updateQuery(): void { |
| 681 | const query = this.#client.getQueryCache().build(this.#client, this.options) |
| 682 | |
| 683 | if (query === this.#currentQuery) { |
| 684 | return |
| 685 | } |
| 686 | |
| 687 | const prevQuery = this.#currentQuery as |
| 688 | | Query<TQueryFnData, TError, TQueryData, TQueryKey> |
| 689 | | undefined |
| 690 | this.#currentQuery = query |
| 691 | this.#currentQueryInitialState = query.state |
| 692 | |
| 693 | if (this.hasListeners()) { |
| 694 | prevQuery?.removeObserver(this) |
| 695 | query.addObserver(this) |
| 696 | } |
| 697 | } |
| 698 | |
| 699 | onQueryUpdate(): void { |
| 700 | this.updateResult() |
no test coverage detected