()
| 839 | } |
| 840 | |
| 841 | #updateQuery(): void { |
| 842 | const query = this.#client.getQueryCache().build(this.#client, this.options) |
| 843 | |
| 844 | if (query === this.#currentQuery) { |
| 845 | return |
| 846 | } |
| 847 | |
| 848 | const prevQuery = this.#currentQuery as |
| 849 | | Query<TQueryFnData, TError, TQueryData, TQueryKey> |
| 850 | | undefined |
| 851 | this.#currentQuery = query |
| 852 | this.#currentQueryInitialState = query.state |
| 853 | |
| 854 | if (this.hasListeners()) { |
| 855 | prevQuery?.removeObserver(this) |
| 856 | query.addObserver(this) |
| 857 | } |
| 858 | } |
| 859 | |
| 860 | /** |
| 861 | * Updates the observer's result when the observed query changes, and reschedules its timers if it |
no test coverage detected