@masters-union/union-stack 0.3.14 → 0.3.15

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.
package/dist/picker.js CHANGED
@@ -1699,6 +1699,20 @@ var Picker = class {
1699
1699
  if (overCap > 0) notices.push(`${overCap} file${overCap > 1 ? "s" : ""} skipped \u2014 max ${cap} allowed`);
1700
1700
  if (notices.length) this.flashNotice(notices.join(" \xB7 "));
1701
1701
  for (const file of chosen) {
1702
+ if (file.size === 0) {
1703
+ const item2 = {
1704
+ uploadId: cryptoId(),
1705
+ file,
1706
+ originalFile: file,
1707
+ edited: false,
1708
+ state: "failed",
1709
+ progress: 0,
1710
+ error: "File is empty (0 bytes) \u2014 if it lives in iCloud/Drive, open it once to download it, then re-add"
1711
+ };
1712
+ this.items.push(item2);
1713
+ this.renderItem(item2);
1714
+ continue;
1715
+ }
1702
1716
  if (this.opts.maxFileSize && file.size > this.opts.maxFileSize) {
1703
1717
  const item2 = {
1704
1718
  uploadId: cryptoId(),