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