diff options
author | Malted <59726149+ma1ted@users.noreply.github.com> | 2021-10-29 12:42:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-29 13:42:10 +0200 |
commit | 8e0fd1dca1dbf5dd30595a859640067020506668 (patch) | |
tree | 748ccb1823b00674d183bdbb55d90052171a30dd /ext/fetch/26_fetch.js | |
parent | 3ae8a8404b2e55898c63dad8a84320a4640b9927 (diff) |
fix(ext/fetch): Replace redundant local variable with inline return statement (#12583)
Diffstat (limited to 'ext/fetch/26_fetch.js')
-rw-r--r-- | ext/fetch/26_fetch.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js index b9e2b1e6b..22baaf5c2 100644 --- a/ext/fetch/26_fetch.js +++ b/ext/fetch/26_fetch.js @@ -411,7 +411,7 @@ */ function fetch(input, init = {}) { // 1. - const p = new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { const prefix = "Failed to call 'fetch'"; webidl.requiredArguments(arguments.length, 1, { prefix }); // 2. @@ -472,7 +472,6 @@ }, ); }); - return p; } function abortFetch(request, responseObject) { |