From 960d9adbe97e96f5c2baa1a5dccdc1d415b9beb3 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Fri, 2 Oct 2020 11:50:39 +0200 Subject: [PATCH] refactor(matcher): remove dead code --- src/matcher/pathTokenizer.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/matcher/pathTokenizer.ts b/src/matcher/pathTokenizer.ts index 92b0cbaa..aa1dd7b3 100644 --- a/src/matcher/pathTokenizer.ts +++ b/src/matcher/pathTokenizer.ts @@ -46,17 +46,11 @@ const VALID_PARAM_RE = /[a-zA-Z0-9_]/ export function tokenizePath(path: string): Array { if (!path) return [[]] if (path === '/') return [[ROOT_TOKEN]] - // // v3 catchAll must be renew - // if (/^\/?\*/.test(path)) - // throw new Error( - // `Catch all routes (/*) must now be defined using a parameter with a custom regex: /:catchAll(.*)` - // ) // remove the leading slash if (__DEV__ && !path.startsWith('/')) { throw new Error( `Route path should start with a "/": "${path}" should be "/${path}". This will break in production.` ) - path = '/' + path } // if (tokenCache.has(path)) return tokenCache.get(path)! -- 2.47.3