diff options
author | Kid <44045911+kidonng@users.noreply.github.com> | 2020-10-26 22:02:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 15:02:08 +0100 |
commit | 4c41ba5ad787909a478a6ef0d4e36adc05b52b9d (patch) | |
tree | e361e87311fb74ed99268355e61d6e8751f94d44 /op_crates/fetch/26_fetch.js | |
parent | b65171e37df066cf7c509434c611163fc8a3c720 (diff) |
fix(op_crates/fetch): ensure Request.method to be string (#8100)
Ensure "Request.method" to be the default value ("GET") if
"init.method" is not defined, which follows browser's behavior.
Diffstat (limited to 'op_crates/fetch/26_fetch.js')
-rw-r--r-- | op_crates/fetch/26_fetch.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/op_crates/fetch/26_fetch.js b/op_crates/fetch/26_fetch.js index 887e329f9..c8b2c8794 100644 --- a/op_crates/fetch/26_fetch.js +++ b/op_crates/fetch/26_fetch.js @@ -990,7 +990,7 @@ this.url = new URL(String(input)).href; } - if (init && "method" in init) { + if (init && "method" in init && init.method) { this.method = normalizeMethod(init.method); } |