fix(fake_async): fixed fakeAsync to throw instead of crashing on cjs
This commit is contained in:
parent
74882c6c38
commit
5c53cf6486
|
@ -129,7 +129,7 @@ function _dequeueTimer(id: number): Function {
|
|||
}
|
||||
|
||||
function _assertInFakeAsyncZone(): void {
|
||||
if (!(<FakeAsyncZone>global.zone)._inFakeAsyncZone) {
|
||||
if (!global.zone || !(<FakeAsyncZone>global.zone)._inFakeAsyncZone) {
|
||||
throw new Error('The code should be running in the fakeAsync zone to call this function');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue