Skip to content

Commit

Permalink
fix(uiSref): Check that state is defined in isMatch()
Browse files Browse the repository at this point in the history
Fixes #1314
Fixes #1332
  • Loading branch information
kz26 authored and christopherthielen committed Sep 12, 2014
1 parent 64b9bea commit 92aebc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stateDirectives.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit 92aebc7

Please sign in to comment.