Skip to content

Commit 0a9aa0c

Browse files
Merge pull request #1361 from angular-ui/issue-1314
fix(uiSref): Check that state is defined in isMatch()
2 parents 64b9bea + 92aebc7 commit 0a9aa0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stateDirectives.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ function $StateRefActiveDirective($state, $stateParams, $interpolate) {
251251
if (typeof $attrs.uiSrefActiveEq !== 'undefined') {
252252
return $state.$current.self === state && matchesParams();
253253
} else {
254-
return $state.includes(state.name) && matchesParams();
254+
return state && $state.includes(state.name) && matchesParams();
255255
}
256256
}
257257

0 commit comments

Comments
 (0)