File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,16 @@ export function pick(obj, ...attr) {
10
10
}
11
11
12
12
// Keep a reference to the real timeout functions so they can be used when overridden
13
- const NATIVE_SET_TIMEOUT = setTimeout ;
14
- const NATIVE_CLEAR_TIMEOUT = clearTimeout ;
13
+ const NATIVE_SET_TIMEOUT = globalThis . setTimeout ;
14
+ const NATIVE_CLEAR_TIMEOUT = globalThis . clearTimeout ;
15
15
16
16
export function installTimerFunctions ( obj , opts ) {
17
17
if ( opts . useNativeTimers ) {
18
18
obj . setTimeoutFn = NATIVE_SET_TIMEOUT . bind ( globalThis ) ;
19
19
obj . clearTimeoutFn = NATIVE_CLEAR_TIMEOUT . bind ( globalThis ) ;
20
20
} else {
21
- obj . setTimeoutFn = setTimeout . bind ( globalThis ) ;
22
- obj . clearTimeoutFn = clearTimeout . bind ( globalThis ) ;
21
+ obj . setTimeoutFn = globalThis . setTimeout . bind ( globalThis ) ;
22
+ obj . clearTimeoutFn = globalThis . clearTimeout . bind ( globalThis ) ;
23
23
}
24
24
}
25
25
You can’t perform that action at this time.
0 commit comments