diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2021-02-09 15:31:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-09 16:31:46 +0100 |
commit | 900953a65a7cb54eb8d11eba4a30e52da7dbb469 (patch) | |
tree | 7ca5b7b8261ffd92c945c618ac8bf9eaf15f5ceb /op_crates/web/11_url.js | |
parent | 47b3e4bada01f29a6cf2a143b94d772242bbab67 (diff) |
fix(op_crates): Don't use `Deno.inspect` in op crates (#9332)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Diffstat (limited to 'op_crates/web/11_url.js')
-rw-r--r-- | op_crates/web/11_url.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/op_crates/web/11_url.js b/op_crates/web/11_url.js index d5474727b..eac679549 100644 --- a/op_crates/web/11_url.js +++ b/op_crates/web/11_url.js @@ -522,7 +522,7 @@ class URL { #searchParams = null; - [Symbol.for("Deno.customInspect")]() { + [Symbol.for("Deno.customInspect")](inspect) { const object = { href: this.href, origin: this.origin, @@ -536,12 +536,7 @@ hash: this.hash, search: this.search, }; - if (typeof globalThis?.Deno?.inspect == "function") { - return `URL ${Deno.inspect(object)}`; - } - return `URL { ${ - Object.entries(object).map(([k, v]) => `${k}: ${v}`).join(", ") - } }`; + return `${this.constructor.name} ${inspect(object)}`; } #updateSearchParams = () => { |