@zip.js/zip.js 2.7.3 → 2.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10425,11 +10425,11 @@
10425
10425
  let parent = this;
10426
10426
  const path = entry.filename.split("/");
10427
10427
  const name = path.pop();
10428
- path.forEach(pathPart => {
10428
+ path.forEach((pathPart, pathIndex) => {
10429
10429
  const previousParent = parent;
10430
10430
  parent = parent.getChildByName(pathPart);
10431
10431
  if (!parent) {
10432
- parent = new ZipDirectoryEntry(this.fs, pathPart, null, previousParent);
10432
+ parent = new ZipDirectoryEntry(this.fs, pathPart, { data: pathIndex == path.length - 1 ? entry : null }, previousParent);
10433
10433
  importedEntries.push(parent);
10434
10434
  }
10435
10435
  });