From 900953a65a7cb54eb8d11eba4a30e52da7dbb469 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Tue, 9 Feb 2021 15:31:46 +0000 Subject: fix(op_crates): Don't use `Deno.inspect` in op crates (#9332) Co-authored-by: Yoshiya Hinosawa --- op_crates/web/11_url.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'op_crates/web/11_url.js') 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 = () => { -- cgit v1.2.3