diff options
Diffstat (limited to 'cli/js/fetch.ts')
| -rw-r--r-- | cli/js/fetch.ts | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/cli/js/fetch.ts b/cli/js/fetch.ts index 0a5f793a8..24daf7f9c 100644 --- a/cli/js/fetch.ts +++ b/cli/js/fetch.ts @@ -188,19 +188,17 @@ class Body implements domTypes.Body, domTypes.ReadableStream, io.ReadCloser { body .trim() .split("&") - .forEach( - (bytes): void => { - if (bytes) { - const split = bytes.split("="); - const name = split.shift()!.replace(/\+/g, " "); - const value = split.join("=").replace(/\+/g, " "); - formData.append( - decodeURIComponent(name), - decodeURIComponent(value) - ); - } + .forEach((bytes): void => { + if (bytes) { + const split = bytes.split("="); + const name = split.shift()!.replace(/\+/g, " "); + const value = split.join("=").replace(/\+/g, " "); + formData.append( + decodeURIComponent(name), + decodeURIComponent(value) + ); } - ); + }); } catch (e) { throw new TypeError("Invalid form urlencoded format"); } |
