From 013c77ac20cf1ed541fed15657d058f334119a9b Mon Sep 17 00:00:00 2001 From: Chris Thielen Date: Sat, 21 May 2016 11:48:43 -0500 Subject: [PATCH] fix(Trace): Fix error in console after $trace.enable() Closes #2752 --- src/common/trace.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/trace.ts b/src/common/trace.ts index 2ab9d1a70..b77a78ca2 100644 --- a/src/common/trace.ts +++ b/src/common/trace.ts @@ -38,7 +38,10 @@ import {stringify, functionToString, maxLength, padString} from "./strings"; /** @hidden */ function uiViewString (viewData) { if (!viewData) return 'ui-view (defunct)'; - return `[ui-view#${viewData.id} tag in template from '${viewData.creationContext.name || '(root)'}' state]: fqn: '${viewData.fqn}', name: '${viewData.name}@${viewData.creationContext}')`; + return `[ui-view#${viewData.id} tag ` + + `in template from '${viewData.creationContext && viewData.creationContext.name || '(root)'}' state]: ` + + `fqn: '${viewData.fqn}', ` + + `name: '${viewData.name}@${viewData.creationContext}')`; } /** @hidden */