File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
packages/router/src/experimental/route-resolver/matchers Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,8 @@ export class MatcherPatternPathDynamic<
200200 ? ( currentMatch ?. split ( '/' ) || [ ] ) . map < string > ( decode )
201201 : decode ( currentMatch )
202202
203+ // we intentionally pass null and empty arrays to the parser
204+ // so they can better control the outcome
203205 params [ paramName ] = ( parser ?. get || identityFn ) ( value )
204206 }
205207
@@ -239,6 +241,7 @@ export class MatcherPatternPathDynamic<
239241 ; [ parser , repeatable , optional ] = this . params [ paramName ]
240242 value = ( parser ?. set || identityFn ) ( params [ paramName ] )
241243
244+ // non optional repeatable params cannot be empty
242245 if ( Array . isArray ( value ) && ! value . length && ! optional ) {
243246 throw miss ( )
244247 }
You can’t perform that action at this time.
0 commit comments