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