diff --git a/lib/fetch/index.js b/lib/fetch/index.js index 4168047e803..516f7e5c56b 100644 --- a/lib/fetch/index.js +++ b/lib/fetch/index.js @@ -1982,7 +1982,7 @@ async function httpNetworkFetch ( // For H2, the headers are a plain JS object // We distinguish between them and iterate accordingly - if (Array.isArray(headers)) { + if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString('latin1') const val = headersList[n + 1].toString('latin1')