diff --git a/modules/@angular/platform-browser/src/browser/tools/tools.ts b/modules/@angular/platform-browser/src/browser/tools/tools.ts index 019098fd07..1890c9289d 100644 --- a/modules/@angular/platform-browser/src/browser/tools/tools.ts +++ b/modules/@angular/platform-browser/src/browser/tools/tools.ts @@ -37,5 +37,7 @@ export function enableDebugTools(ref: ComponentRef): ComponentRef { * @experimental All debugging apis are currently experimental. */ export function disableDebugTools(): void { - delete context.ng.profiler; + if (context.ng) { + delete context.ng.profiler; + } }