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