File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ function optimizedMatcher (
260260 if ( isStatic ( route ) ) {
261261 staticMap [ normalizedPath ] = { index, route }
262262 } else {
263- const firstLevel = firstLevelStatic ( normalizedPath . toLowerCase ( ) )
263+ const firstLevel = firstLevelStatic ( path . toLowerCase ( ) )
264264 if ( firstLevel ) {
265265 if ( ! firstLevelStaticMap [ firstLevel ] ) {
266266 firstLevelStaticMap [ firstLevel ] = [ ]
@@ -273,18 +273,11 @@ function optimizedMatcher (
273273 } )
274274
275275 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 ]
285278
286279 const firstLevel = firstLevelStatic ( path )
287- const firstLevelRoutes = firstLevelStaticMap [ firstLevel && firstLevel . toLowerCase ( ) ] || [ ]
280+ const firstLevelRoutes = firstLevelStaticMap [ firstLevel ] || [ ]
288281
289282 for ( let i = 0 ; i < firstLevelRoutes . length ; i ++ ) {
290283 const { index, route } = firstLevelRoutes [ i ]
You can’t perform that action at this time.
0 commit comments