Skip to content

Commit db0afdf

Browse files
committed
fix(router-core): simplify pathname parsing by removing unnecessary decoding logic
Signed-off-by: leesb971204 <leesb971204@gmail.com>
1 parent 1c3303b commit db0afdf

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/router-core/src/path.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,7 @@ export function parsePathname(pathname?: string): Array<Segment> {
183183

184184
return {
185185
type: 'pathname',
186-
value: part.includes('%25')
187-
? part
188-
.split('%25')
189-
.map((segment) => decodeURI(segment))
190-
.join('%25')
191-
: decodeURI(part),
186+
value: part,
192187
}
193188
}),
194189
)

0 commit comments

Comments
 (0)