(
fetchOptions?: Omit<ObserverFetchOptions, 'initialPromise'>,
)
| 351 | } |
| 352 | |
| 353 | #executeFetch( |
| 354 | fetchOptions?: Omit<ObserverFetchOptions, 'initialPromise'>, |
| 355 | ): Promise<TQueryData | undefined> { |
| 356 | // Make sure we reference the latest query as the current one might have been removed |
| 357 | this.#updateQuery() |
| 358 | |
| 359 | // Fetch |
| 360 | let promise: Promise<TQueryData | undefined> = this.#currentQuery.fetch( |
| 361 | this.options, |
| 362 | fetchOptions, |
| 363 | ) |
| 364 | |
| 365 | if (!fetchOptions?.throwOnError) { |
| 366 | promise = promise.catch(noop) |
| 367 | } |
| 368 | |
| 369 | return promise |
| 370 | } |
| 371 | |
| 372 | #updateStaleTimeout(): void { |
| 373 | this.#clearStaleTimeout() |
no test coverage detected