fix(zone.js): clearTimeout/clearInterval should call on object global (#37858)
Close #37333 `clearTimeout` is patched by `zone.js`, and it finally calls the native delegate of `clearTimeout`, the current implemention only call `clearNative(id)`, but it should call on object `global` like `clearNative.call(global, id)`. Otherwise in some env, it will throw error `clearTimeout called on an object that does not implement interface Window` PR Close #37858
This commit is contained in:

committed by
Michael Prentice

parent
788532dc99
commit
9e7ce2c916
@ -55,7 +55,7 @@ export function patchTimer(window: any, setName: string, cancelName: string, nam
|
||||
}
|
||||
|
||||
function clearTask(task: Task) {
|
||||
return clearNative!((<TimerOptions>task.data).handleId);
|
||||
return clearNative!.call(window, (<TimerOptions>task.data).handleId);
|
||||
}
|
||||
|
||||
setNative =
|
||||
|
Reference in New Issue
Block a user