Skip to content

Commit 5014265

Browse files
committed
feat(useQuery): make refetchInterval accept a function
use false as a fallback instead of zero
1 parent d250073 commit 5014265

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/queryObserver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ export class QueryObserver<
371371
private computeRefetchInterval() {
372372
return typeof this.options.refetchInterval === 'function'
373373
? this.options.refetchInterval(this.currentResult.data, this.currentQuery)
374-
: this.options.refetchInterval ?? 0
374+
: this.options.refetchInterval ?? false
375375
}
376376

377377
private updateRefetchInterval(nextInterval: number | false): void {

0 commit comments

Comments
 (0)