File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,6 @@ function baseParsePathname(pathname: string): ReadonlyArray<Segment> {
377377interface InterpolatePathOptions {
378378 path ?: string
379379 params : Record < string , unknown >
380- leaveParams ?: boolean
381380 // Map of encoded chars to decoded chars (e.g. '%40' -> '@') that should remain decoded in path params
382381 decodeCharMap ?: Map < string , string >
383382 parseCache ?: ParsePathnameCache
@@ -402,7 +401,6 @@ type InterPolatePathResult = {
402401export function interpolatePath ( {
403402 path,
404403 params,
405- leaveParams,
406404 decodeCharMap,
407405 parseCache,
408406} : InterpolatePathOptions ) : InterPolatePathResult {
Original file line number Diff line number Diff line change @@ -1684,14 +1684,13 @@ export class RouterCore<
16841684 }
16851685
16861686 const nextPathname = opts . leaveParams
1687- ? nextTo
1687+ ? // Use the original template path for interpolation
1688+ // This preserves the original parameter syntax including optional parameters
1689+ nextTo
16881690 : decodePath (
16891691 interpolatePath ( {
1690- // Use the original template path for interpolation
1691- // This preserves the original parameter syntax including optional parameters
16921692 path : nextTo ,
16931693 params : nextParams ,
1694- leaveParams : opts . leaveParams ,
16951694 decodeCharMap : this . pathParamsDecodeCharMap ,
16961695 parseCache : this . parsePathnameCache ,
16971696 } ) . interpolatedPath ,
You can’t perform that action at this time.
0 commit comments