Skip to content

Commit 7535383

Browse files
authored
fix: clearTimeout instead of clearInterval (#1305)
jest modern timers break because the stale timeout is created with setTimeout but cleared with clearInterval
1 parent a56a5b5 commit 7535383

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
@@ -233,7 +233,7 @@ export class QueryObserver<TResult, TError> {
233233

234234
private clearStaleTimeout(): void {
235235
if (this.staleTimeoutId) {
236-
clearInterval(this.staleTimeoutId)
236+
clearTimeout(this.staleTimeoutId)
237237
this.staleTimeoutId = undefined
238238
}
239239
}

0 commit comments

Comments
 (0)