Unverified Commit 46d3f0e2 authored by Kiko Beats's avatar Kiko Beats Committed by GitHub

fix(next-url): print properly using logger symbol (#36097)

Hello,

This PR adds a method to have a custom inspect for `NextURL`

closes #35519
parent da6f271d
...@@ -245,6 +245,23 @@ export class NextURL { ...@@ -245,6 +245,23 @@ export class NextURL {
return this.href return this.href
} }
[Symbol.for('edge-runtime.inspect.custom')]() {
return {
href: this.href,
origin: this.origin,
protocol: this.protocol,
username: this.username,
password: this.password,
host: this.host,
hostname: this.hostname,
port: this.port,
pathname: this.pathname,
search: this.search,
searchParams: this.searchParams,
hash: this.hash,
}
}
clone() { clone() {
return new NextURL(String(this), this[Internal].options) return new NextURL(String(this), this[Internal].options)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment