@@ -155,10 +155,8 @@ export class QueryObserver<
155
155
this . options . enabled !== undefined &&
156
156
typeof this . options . enabled !== 'boolean' &&
157
157
typeof this . options . enabled !== 'function' &&
158
- typeof resolveOption (
159
- this . options . enabled ,
160
- this . #currentQuery,
161
- ) !== 'boolean'
158
+ typeof resolveOption ( this . options . enabled , this . #currentQuery) !==
159
+ 'boolean'
162
160
) {
163
161
throw new Error (
164
162
'Expected enabled to be a boolean or a callback that returns a boolean' ,
@@ -344,10 +342,7 @@ export class QueryObserver<
344
342
345
343
#updateStaleTimeout( ) : void {
346
344
this . #clearStaleTimeout( )
347
- const staleTime = resolveOption (
348
- this . options . staleTime ,
349
- this . #currentQuery,
350
- )
345
+ const staleTime = resolveOption ( this . options . staleTime , this . #currentQuery)
351
346
352
347
if ( isServer || this . #currentResult. isStale || ! isValidTimeout ( staleTime ) ) {
353
348
return
@@ -368,10 +363,7 @@ export class QueryObserver<
368
363
369
364
#computeRefetchInterval( ) {
370
365
return (
371
- resolveOption (
372
- this . options . refetchInterval ,
373
- this . #currentQuery,
374
- ) ?? false
366
+ resolveOption ( this . options . refetchInterval , this . #currentQuery) ?? false
375
367
)
376
368
}
377
369
@@ -382,8 +374,7 @@ export class QueryObserver<
382
374
383
375
if (
384
376
isServer ||
385
- resolveOption ( this . options . enabled , this . #currentQuery) ===
386
- false ||
377
+ resolveOption ( this . options . enabled , this . #currentQuery) === false ||
387
378
! isValidTimeout ( this . #currentRefetchInterval) ||
388
379
this . #currentRefetchInterval === 0
389
380
) {
@@ -658,8 +649,7 @@ export class QueryObserver<
658
649
}
659
650
660
651
const { notifyOnChangeProps } = this . options
661
- const notifyOnChangePropsValue =
662
- resolveOption ( notifyOnChangeProps )
652
+ const notifyOnChangePropsValue = resolveOption ( notifyOnChangeProps )
663
653
664
654
if (
665
655
notifyOnChangePropsValue === 'all' ||
0 commit comments