Skip to content

Commit

Permalink
Check that state variable is defined in isMatch()
Browse files Browse the repository at this point in the history
  • Loading branch information
kz26 committed Sep 1, 2014
1 parent ee292fd commit 11a423d
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 11a423d

Please sign in to comment.