Skip to content

Commit 960d9ad

Browse files
committed
refactor(matcher): remove dead code
1 parent 14e1eb9 commit 960d9ad

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/matcher/pathTokenizer.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,11 @@ const VALID_PARAM_RE = /[a-zA-Z0-9_]/
4646
export function tokenizePath(path: string): Array<Token[]> {
4747
if (!path) return [[]]
4848
if (path === '/') return [[ROOT_TOKEN]]
49-
// // v3 catchAll must be renew
50-
// if (/^\/?\*/.test(path))
51-
// throw new Error(
52-
// `Catch all routes (/*) must now be defined using a parameter with a custom regex: /:catchAll(.*)`
53-
// )
5449
// remove the leading slash
5550
if (__DEV__ && !path.startsWith('/')) {
5651
throw new Error(
5752
`Route path should start with a "/": "${path}" should be "/${path}". This will break in production.`
5853
)
59-
path = '/' + path
6054
}
6155

6256
// if (tokenCache.has(path)) return tokenCache.get(path)!

0 commit comments

Comments
 (0)