diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-10-09 06:12:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-09 16:12:44 +1100 |
commit | 98727b331d0e8a762745e049641317c0d64b25f0 (patch) | |
tree | d5e99698cc3da061787329c0980d5f2790ca2eeb /op_crates/fetch/26_fetch.js | |
parent | c06fbc449d3a92b5a650ce5bddb28ebbfebf3aa7 (diff) |
fix(op_crates/fetch): Stringify and parse Request URLs (#7838)
Fixes #7837
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) { |