diff options
Diffstat (limited to 'ext/fetch/20_headers.js')
-rw-r--r-- | ext/fetch/20_headers.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/fetch/20_headers.js b/ext/fetch/20_headers.js index a2fae2cfe..54e635522 100644 --- a/ext/fetch/20_headers.js +++ b/ext/fetch/20_headers.js @@ -68,7 +68,8 @@ */ function fillHeaders(headers, object) { if (ArrayIsArray(object)) { - for (const header of new SafeArrayIterator(object)) { + for (let i = 0; i < object.length; ++i) { + const header = object[i]; if (header.length !== 2) { throw new TypeError( `Invalid header. Length must be 2, but is ${header.length}`, @@ -205,7 +206,8 @@ // spec but produce the same result. const headers = {}; const cookies = []; - for (const entry of new SafeArrayIterator(list)) { + for (let i = 0; i < list.length; ++i) { + const entry = list[i]; const name = byteLowerCase(entry[0]); const value = entry[1]; if (value === null) throw new TypeError("Unreachable"); |