Skip to content

Commit

Permalink
remove pageContext.urlParsed.hrefWithBase
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Jul 19, 2024
1 parent 3c002ec commit 4e773c7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions vike/utils/parseUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ import pc from '@brillout/picocolors'

// JSDocs copied from https://vike.dev/pageContext
type UrlPublic = {
/** The full URL. (Without Base URL.) */
/** The full URL. */
href: string
/** The full URL. (With Base URL.) */
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 +94,11 @@ function parseUrl(url: string, baseServer: string): UrlPrivate {

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

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

0 comments on commit 4e773c7

Please sign in to comment.