Skip to content

Commit c85f721

Browse files
committed
Fix regression due to root being marked as not navigable
1 parent d539202 commit c85f721

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/state.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
4747
if (url.charAt(0) == '^') {
4848
url = state.url = $urlMatcherFactory.compile(url.substring(1));
4949
} else {
50-
url = state.url = parent.navigable.url.concat(url);
50+
url = state.url = (parent.navigable || root).url.concat(url);
5151
}
5252
} else if (isObject(url) &&
5353
isFunction(url.exec) && isFunction(url.format) && isFunction(url.concat)) {
@@ -57,7 +57,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
5757
}
5858

5959
// Keep track of the closest ancestor state that has a URL (i.e. is navigable)
60-
state.navigable = state.url ? state : parent ? parent.navigable : null;
60+
state.navigable = url ? state : parent ? parent.navigable : null;
6161

6262
// Derive parameters for this state and ensure they're a super-set of parent's parameters
6363
var params = state.params;

0 commit comments

Comments
 (0)