Skip to content
Merged
5 changes: 5 additions & 0 deletions src/create-matcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ export function createMatcher (
router: VueRouter
): Matcher {
const { pathList, pathMap, nameMap } = createRouteMap(routes)
const pathsMissingSlashes = pathList.filter(path => !!path && path.charAt(0) !== '/')

if (pathsMissingSlashes.length > 0) {
warn(false, `There is at least one root route without a leading slash in its path.`)
}

function addRoutes (routes) {
createRouteMap(routes, pathList, pathMap, nameMap)
Expand Down