From 98727b331d0e8a762745e049641317c0d64b25f0 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Fri, 9 Oct 2020 06:12:44 +0100 Subject: fix(op_crates/fetch): Stringify and parse Request URLs (#7838) Fixes #7837 --- op_crates/fetch/26_fetch.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'op_crates') diff --git a/op_crates/fetch/26_fetch.js b/op_crates/fetch/26_fetch.js index 9916a4f82..88744981b 100644 --- a/op_crates/fetch/26_fetch.js +++ b/op_crates/fetch/26_fetch.js @@ -985,8 +985,9 @@ this.headers = new Headers(input.headers); this.credentials = input.credentials; this._stream = input._stream; - } else if (typeof input === "string") { - this.url = input; + } else { + // TODO(nayeemrmn): Base from `--location` when implemented and set. + this.url = new URL(String(input)).href; } if (init && "method" in init) { -- cgit v1.2.3