Skip to content

Commit

Permalink
fix deep clone implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
gildas-lormeau committed Feb 24, 2023
1 parent 70c24a2 commit 45f4087
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/core/zip-fs-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,9 @@ class ZipDirectoryEntry extends ZipEntry {
const clone = new ZipDirectoryEntry(zipEntry.fs, zipEntry.name);
if (deepClone) {
clone.children = zipEntry.children.map(child => {
child.clone(deepClone);
child.parent = this;
const clone = child.clone(deepClone);
clone.parent = zipEntry;
return clone;
});
}
return clone;
Expand Down

0 comments on commit 45f4087

Please sign in to comment.