Skip to content

Commit 7b67bad

Browse files
Dzmitry Shylovichchuckjaz
authored andcommitted
fix(platform_browser): fix disableDebugTools() (#12918)
1 parent dc1662a commit 7b67bad

File tree

1 file changed

+3
-1
lines changed
  • modules/@angular/platform-browser/src/browser/tools

1 file changed

+3
-1
lines changed

modules/@angular/platform-browser/src/browser/tools/tools.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,7 @@ export function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T> {
3737
* @experimental All debugging apis are currently experimental.
3838
*/
3939
export function disableDebugTools(): void {
40-
delete context.ng.profiler;
40+
if (context.ng) {
41+
delete context.ng.profiler;
42+
}
4143
}

0 commit comments

Comments
 (0)