From 7e31f2782d753340d561b9e986d97be65c0e6979 Mon Sep 17 00:00:00 2001 From: Sidarta Veloso Date: Fri, 16 Aug 2024 15:41:47 -0300 Subject: [PATCH] fix: totalEntries is not defined Update zipFile.js, declaring totalEntries variable using 'let' keyword. resolv: #534 --- zipFile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipFile.js b/zipFile.js index 234f6cd..a52db94 100644 --- a/zipFile.js +++ b/zipFile.js @@ -294,7 +294,7 @@ module.exports = function (/*Buffer|null*/ inBuffer, /** object */ options) { mainHeader.size = 0; mainHeader.offset = 0; - totalEntries = 0; + let totalEntries = 0; for (const entry of this.entries) { // compress data and set local and entry header accordingly. Reason why is called first