Skip to content

Commit

Permalink
minor refactor: hostname => host
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Jul 19, 2024
1 parent d802189 commit 74aaa14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vike/utils/parseUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ function parseOrigin(url: string): { pathname: string; origin: null | string; pr
} else {
const { protocol, uriWithoutProtocol } = parseProtocol(url)
assert(protocol)
const [hostname, ...rest] = uriWithoutProtocol.split('/')
const origin = protocol + hostname!
const [host, ...rest] = uriWithoutProtocol.split('/')
const origin = protocol + host!
const pathname = '/' + rest.join('/')
return { pathname, origin, protocol }
}
Expand Down

0 comments on commit 74aaa14

Please sign in to comment.