Skip to content

Commit

Permalink
refactor: simplify location parsing (#1691)
Browse files Browse the repository at this point in the history
* chore: maybe it's unnecessary to add this expression

* style: format code
  • Loading branch information
MonsterPi13 committed Dec 15, 2023
1 parent 8b59f86 commit b298d56
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/router/src/location.ts
Expand Up @@ -244,9 +244,6 @@ export function resolveRelativePath(to: string, from: string): string {
return (
fromSegments.slice(0, position).join('/') +
'/' +
toSegments
// ensure we use at least the last element in the toSegments
.slice(toPosition - (toPosition === toSegments.length ? 1 : 0))
.join('/')
toSegments.slice(toPosition).join('/')
)
}

0 comments on commit b298d56

Please sign in to comment.