summaryrefslogtreecommitdiff
path: root/ext/url/00_url.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2022-06-14 19:25:58 -0400
committerColin Ihrig <cjihrig@gmail.com>2022-06-15 09:52:28 -0400
commitb2109a12aa84b5006616a3e82cb26acf53c23e81 (patch)
treef454d0db7fe18edeb8ac91e39cc3afd78f91292a /ext/url/00_url.js
parenteadf943e594a5ebf95ddf7e007cfb7d2dcff130e (diff)
fix(url): properly indent when inspecting URLs (#14867)
This commit updates the custom inspect function for URL objects to pass the inspect options through so that the context is propagated and the resulting indentation is correct. Fixes: https://github.com/denoland/deno/issues/14171
Diffstat (limited to 'ext/url/00_url.js')
-rw-r--r--ext/url/00_url.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/url/00_url.js b/ext/url/00_url.js
index ab3488455..3d81e5b9d 100644
--- a/ext/url/00_url.js
+++ b/ext/url/00_url.js
@@ -322,7 +322,7 @@
this[_url] = opUrlParse(url, base);
}
- [SymbolFor("Deno.privateCustomInspect")](inspect) {
+ [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) {
const object = {
href: this.href,
origin: this.origin,
@@ -336,7 +336,7 @@
hash: this.hash,
search: this.search,
};
- return `${this.constructor.name} ${inspect(object)}`;
+ return `${this.constructor.name} ${inspect(object, inspectOptions)}`;
}
#updateSearchParams() {