From 92aebc7520f88babdc6e266536086e07263514c3 Mon Sep 17 00:00:00 2001 From: kz26 Date: Sun, 31 Aug 2014 21:55:57 -0400 Subject: [PATCH] fix(uiSref): Check that state is defined in isMatch() Fixes #1314 Fixes #1332 --- src/stateDirectives.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stateDirectives.js b/src/stateDirectives.js index 96ca0ca2b..3b5831885 100644 --- a/src/stateDirectives.js +++ b/src/stateDirectives.js @@ -251,7 +251,7 @@ function $StateRefActiveDirective($state, $stateParams, $interpolate) { if (typeof $attrs.uiSrefActiveEq !== 'undefined') { return $state.$current.self === state && matchesParams(); } else { - return $state.includes(state.name) && matchesParams(); + return state && $state.includes(state.name) && matchesParams(); } }