Skip to content

Commit 2b6cc8e

Browse files
committed
cleanup
1 parent 9e545ef commit 2b6cc8e

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

packages/router-core/src/path.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ function baseParsePathname(pathname: string): ReadonlyArray<Segment> {
377377
interface 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 = {
402401
export function interpolatePath({
403402
path,
404403
params,
405-
leaveParams,
406404
decodeCharMap,
407405
parseCache,
408406
}: InterpolatePathOptions): InterPolatePathResult {

packages/router-core/src/router.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)