diff --git a/lib/core/zip-fs-core.js b/lib/core/zip-fs-core.js index 2bd14db1..020b7d74 100644 --- a/lib/core/zip-fs-core.js +++ b/lib/core/zip-fs-core.js @@ -221,9 +221,9 @@ class ZipDirectoryEntry extends ZipEntry { const clonedEntry = new ZipDirectoryEntry(zipEntry.fs, zipEntry.name); if (deepClone) { clonedEntry.children = zipEntry.children.map(child => { - const clone = child.clone(deepClone); - clone.parent = clonedEntry; - return clonedEntry; + const childClone = child.clone(deepClone); + childClone.parent = clonedEntry; + return childClone; }); } return clonedEntry;