Skip to content

Commit

Permalink
rename hrefOriginal hrefWithBase
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Jul 19, 2024
1 parent d71bd14 commit 3c002ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vike/utils/parseUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type UrlPublic = {
/** The full URL. (Without Base URL.) */
href: string
/** The full URL. (With Base URL.) */
hrefOriginal: string
hrefWithBase: string
/** The URL protocol, e.g. `https://` in `https://example.com` */
protocol: null | string
/** The URL host, e.g. `example.com` in `https://example.com/product` */
Expand Down Expand Up @@ -96,13 +96,13 @@ function parseUrl(url: string, baseServer: string): UrlPrivate {

// More props
const href = createUrlFromComponents(origin, pathname, searchOriginal, hashOriginal)
const hrefOriginal = createUrlFromComponents(origin, pathnameAbsoluteWithBase, searchOriginal, hashOriginal)
const hrefWithBase = createUrlFromComponents(origin, pathnameAbsoluteWithBase, searchOriginal, hashOriginal)
const host = !origin ? null : origin.slice(protocol!.length)

assert(pathname.startsWith('/'))
return {
href,
hrefOriginal,
hrefWithBase,
protocol,
host,
origin,
Expand Down

0 comments on commit 3c002ec

Please sign in to comment.