Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/router-core/src/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ export function interpolatePath({
path,
params,
decoder,
server,
// `server` is marked @internal and stripped from .d.ts by `stripInternal`.
// We avoid destructuring it in the function signature so the emitted
// declaration doesn't reference a property that no longer exists.
...rest
}: InterpolatePathOptions): InterPolatePathResult {
// Tracking if any params are missing in the `params` object
// when interpolating the path
Expand All @@ -283,7 +286,7 @@ export function interpolatePath({
if (!path.includes('$'))
return { interpolatedPath: path, usedParams, isMissingParams }

if (isServer ?? server) {
if (isServer ?? rest.server) {
// Fast path for common templates like `/posts/$id` or `/files/$`.
// Braced segments (`{...}`) are more complex (prefix/suffix/optional) and are
// handled by the general parser below.
Expand Down
Loading