Skip to content

Commit c9b6570

Browse files
fix(ng2.uiSrefActive): don't puke on sref to invalid target state
1 parent c113b37 commit c9b6570

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ng2/directives/uiSrefStatus.ts

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const inactiveStatus: SrefStatus = {
4141
* match the (tail of) the path, and the path's param values
4242
*/
4343
const pathMatches = (target: TargetState): Predicate<PathNode[]> => {
44+
if (!target.exists()) return () => false;
4445
let state: State = target.$state();
4546
let targetParamVals = target.params();
4647
let targetPath: PathNode[] = PathFactory.buildPath(target);

0 commit comments

Comments
 (0)