File tree 1 file changed +4
-11
lines changed
1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ function optimizedMatcher (
260
260
if ( isStatic ( route ) ) {
261
261
staticMap [ normalizedPath ] = { index, route }
262
262
} else {
263
- const firstLevel = firstLevelStatic ( normalizedPath . toLowerCase ( ) )
263
+ const firstLevel = firstLevelStatic ( path . toLowerCase ( ) )
264
264
if ( firstLevel ) {
265
265
if ( ! firstLevelStaticMap [ firstLevel ] ) {
266
266
firstLevelStaticMap [ firstLevel ] = [ ]
@@ -273,18 +273,11 @@ function optimizedMatcher (
273
273
} )
274
274
275
275
function match ( path , params ) {
276
- const cleanPath = path . replace ( / \/ $ / , '' )
277
- let record = staticMap [ cleanPath . toLowerCase ( ) ]
278
-
279
- if ( ! record ) {
280
- const staticRecordInsensitive = staticMap [ cleanPath . toLowerCase ( ) ]
281
- if ( staticRecordInsensitive && staticRecordInsensitive . route . regex . ignoreCase ) {
282
- record = staticRecordInsensitive
283
- }
284
- }
276
+ const cleanPath = path . replace ( / \/ $ / , '' ) . toLowerCase ( )
277
+ let record = staticMap [ cleanPath ]
285
278
286
279
const firstLevel = firstLevelStatic ( path )
287
- const firstLevelRoutes = firstLevelStaticMap [ firstLevel && firstLevel . toLowerCase ( ) ] || [ ]
280
+ const firstLevelRoutes = firstLevelStaticMap [ firstLevel ] || [ ]
288
281
289
282
for ( let i = 0 ; i < firstLevelRoutes . length ; i ++ ) {
290
283
const { index, route } = firstLevelRoutes [ i ]
You can’t perform that action at this time.
0 commit comments