feat(router): drop index property

Use path: '/' instead of 'index: true'
This commit is contained in:
vsavkin
2016-06-16 13:53:34 -07:00
parent f8e8d22e4e
commit 2773281338
5 changed files with 4 additions and 66 deletions

View File

@ -111,7 +111,7 @@ function processPathsWithParamsAgainstRoute(
}
function match(segment: UrlSegment, route: Route, paths: UrlPathWithParams[]) {
if (route.index || route.path === '' || route.path === '/') {
if (route.path === '' || route.path === '/') {
if (route.terminal && (Object.keys(segment.children).length > 0 || paths.length > 0)) {
throw new NoMatch();
} else {