()
| 694 | } |
| 695 | |
| 696 | #updateQuery(): void { |
| 697 | const query = this.#client.getQueryCache().build(this.#client, this.options) |
| 698 | |
| 699 | if (query === this.#currentQuery) { |
| 700 | return |
| 701 | } |
| 702 | |
| 703 | const prevQuery = this.#currentQuery as |
| 704 | | Query<TQueryFnData, TError, TQueryData, TQueryKey> |
| 705 | | undefined |
| 706 | this.#currentQuery = query |
| 707 | this.#currentQueryInitialState = query.state |
| 708 | |
| 709 | if (this.hasListeners()) { |
| 710 | prevQuery?.removeObserver(this) |
| 711 | query.addObserver(this) |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | onQueryUpdate(): void { |
| 716 | this.updateResult() |
no test coverage detected