Skip to content

Commit

Permalink
minor refactor: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Jul 19, 2024
1 parent 4e773c7 commit 091cd0e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vike/utils/parseUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,13 @@ function parseUrl(url: string, baseServer: string): UrlPrivate {
})

// Origin + pathname
let { protocol, origin, pathnameAbsoluteWithBase } = getPathnameWithBase(urlWithoutHashNorSearch, baseServer)
const { protocol, origin, pathnameAbsoluteWithBase } = getPathnameWithBase(urlWithoutHashNorSearch, baseServer)
const pathnameOriginal = urlWithoutHashNorSearch.slice((origin || '').length)
assertUrlComponents(url, origin, pathnameOriginal, searchOriginal, hashOriginal)

// Base URL
let { pathname, hasBaseServer } = removeBaseServer(pathnameAbsoluteWithBase, baseServer)
pathname = decodePathname(pathname)
pathnameAbsoluteWithBase = decodePathname(pathnameAbsoluteWithBase)

// More props
const href = createUrlFromComponents(origin, pathname, searchOriginal, hashOriginal)
Expand Down

0 comments on commit 091cd0e

Please sign in to comment.