Skip to content

Commit c539194

Browse files
committed
fix(cdk/testing): TestbedHarnessEnvironment should work when Zone is not present
This commit fixes the harness environment which assumes Zone is always defined on the page.
1 parent eb22e2e commit c539194

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cdk/testing/testbed/testbed-harness-environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function uninstallAutoChangeDetectionStatusHandler(fixture: ComponentFixture<unk
6969

7070
/** Whether we are currently in the fake async zone. */
7171
function isInFakeAsyncZone() {
72-
return Zone!.current.get('FakeAsyncTestZoneSpec') != null;
72+
return typeof Zone !== 'undefined' || Zone!.current.get('FakeAsyncTestZoneSpec') != null;
7373
}
7474

7575
/**

0 commit comments

Comments
 (0)