Skip to content

Commit 11a423d

Browse files
committed
Check that state variable is defined in isMatch()
1 parent ee292fd commit 11a423d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stateDirectives.js

Lines changed: 1 addition & 1 deletion
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)