From c9b657040b3c0910d7f2ff76f5803135986ee03a Mon Sep 17 00:00:00 2001 From: Chris Thielen Date: Thu, 1 Sep 2016 16:06:39 -0500 Subject: [PATCH] fix(ng2.uiSrefActive): don't puke on sref to invalid target state --- src/ng2/directives/uiSrefStatus.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ng2/directives/uiSrefStatus.ts b/src/ng2/directives/uiSrefStatus.ts index c57f28562..94d2bd90e 100644 --- a/src/ng2/directives/uiSrefStatus.ts +++ b/src/ng2/directives/uiSrefStatus.ts @@ -41,6 +41,7 @@ const inactiveStatus: SrefStatus = { * match the (tail of) the path, and the path's param values */ const pathMatches = (target: TargetState): Predicate => { + if (!target.exists()) return () => false; let state: State = target.$state(); let targetParamVals = target.params(); let targetPath: PathNode[] = PathFactory.buildPath(target);