summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/fetch/23_request.js11
-rw-r--r--ext/fetch/23_response.js10
2 files changed, 10 insertions, 11 deletions
diff --git a/ext/fetch/23_request.js b/ext/fetch/23_request.js
index 5221d5ca9..508a29139 100644
--- a/ext/fetch/23_request.js
+++ b/ext/fetch/23_request.js
@@ -35,7 +35,6 @@
ObjectKeys,
ObjectPrototypeIsPrototypeOf,
RegExpPrototypeTest,
- SafeArrayIterator,
Symbol,
SymbolFor,
TypeError,
@@ -159,11 +158,11 @@
* @returns {InnerRequest}
*/
function cloneInnerRequest(request) {
- const headerList = [
- ...new SafeArrayIterator(
- ArrayPrototypeMap(request.headerList, (x) => [x[0], x[1]]),
- ),
- ];
+ const headerList = ArrayPrototypeMap(
+ request.headerList,
+ (x) => [x[0], x[1]],
+ );
+
let body = null;
if (request.body !== null) {
body = request.body.clone();
diff --git a/ext/fetch/23_response.js b/ext/fetch/23_response.js
index 3c19f963a..d5adb8042 100644
--- a/ext/fetch/23_response.js
+++ b/ext/fetch/23_response.js
@@ -97,11 +97,11 @@
*/
function cloneInnerResponse(response) {
const urlList = [...new SafeArrayIterator(response.urlList)];
- const headerList = [
- ...new SafeArrayIterator(
- ArrayPrototypeMap(response.headerList, (x) => [x[0], x[1]]),
- ),
- ];
+ const headerList = ArrayPrototypeMap(
+ response.headerList,
+ (x) => [x[0], x[1]],
+ );
+
let body = null;
if (response.body !== null) {
body = response.body.clone();