From 8e0fd1dca1dbf5dd30595a859640067020506668 Mon Sep 17 00:00:00 2001 From: Malted <59726149+ma1ted@users.noreply.github.com> Date: Fri, 29 Oct 2021 12:42:10 +0100 Subject: fix(ext/fetch): Replace redundant local variable with inline return statement (#12583) --- ext/fetch/26_fetch.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ext') 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) { -- cgit v1.2.3