diff options
Diffstat (limited to 'op_crates/fetch/26_fetch.js')
-rw-r--r-- | op_crates/fetch/26_fetch.js | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |