diff --git a/lib/internal/zip/headers.js b/lib/internal/zip/headers.js index bf6f7901516a..3bcb81f23dd5 100644 --- a/lib/internal/zip/headers.js +++ b/lib/internal/zip/headers.js @@ -6,7 +6,6 @@ // which walks the central directory into an array of headers. const { - ArrayPrototypePush, MathMax, Number, } = primordials; @@ -604,7 +603,7 @@ function readCentralDirectory(buffer, count) { if (header.diskNumber !== 0) { throw new ERR_ZIP_UNSUPPORTED_FEATURE('multi-disk archives are not supported'); } - ArrayPrototypePush(result, header); + result[index] = header; pos += header.byteLength; } if (pos !== buffer.length) {