Skip to content

Commit

Permalink
fix(next-url): print properly using logger symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Apr 11, 2022
1 parent 3931888 commit 4261048
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/next/server/web/next-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,23 @@ export class NextURL {
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() {
return new NextURL(String(this), this[Internal].options)
}
Expand Down

0 comments on commit 4261048

Please sign in to comment.