Skip to content

Commit 09a787e

Browse files
committed
ref: move provider check behind env check
1 parent fb22c67 commit 09a787e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/query-core/src/timeoutManager.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,8 @@ export class TimeoutManager implements Omit<TimeoutProvider, 'name'> {
7272
setTimeoutProvider<TTimerId extends ManagedTimerId>(
7373
provider: TimeoutProvider<TTimerId>,
7474
): void {
75-
if (provider === this.#provider) {
76-
return
77-
}
78-
7975
if (process.env.NODE_ENV !== 'production') {
80-
if (this.#providerCalled) {
76+
if (this.#providerCalled && provider !== this.#provider) {
8177
// After changing providers, `clearTimeout` will not work as expected for
8278
// timeouts from the previous provider.
8379
//

0 commit comments

Comments
 (0)