From ce89039036bc4c748fc553595a2e554b8b8254ad Mon Sep 17 00:00:00 2001 From: Dzmitry Shylovich Date: Wed, 16 Nov 2016 20:16:40 +0300 Subject: [PATCH] fix(platform_browser): fix disableDebugTools() (#12918) --- modules/@angular/platform-browser/src/browser/tools/tools.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; + } }