A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: fix crash on download all attachement
ammarahm-ede6162b258041
diff --git a/apps/mobile/app/common/filesystem/download-attachment.js b/apps/mobile/app/common/filesystem/download-attachment.jsindex 34ca2c5a4..c0ca928b8 100644--- a/apps/mobile/app/common/filesystem/download-attachment.js+++ b/apps/mobile/app/common/filesystem/download-attachment.js@@ -130,7 +130,7 @@ export async function downloadAttachments(RNFetchBlob.fs.unlink(zipSourceFolder).catch(console.log);return;}- if (result.size) {+ if (result?.size) {let sub;try {onProgress?.(0, `Zipping... Please wait`);diff --git a/apps/mobile/app/components/attachments/download-attachments.js b/apps/mobile/app/components/attachments/download-attachments.jsindex 6514a4e7f..71b9deb8e 100644--- a/apps/mobile/app/components/attachments/download-attachments.js+++ b/apps/mobile/app/components/attachments/download-attachments.js@@ -55,7 +55,7 @@ const DownloadAttachments = ({ close, attachments, isNote, update }) => {groupId.current);if (canceled.current) return;- setResult(result);+ setResult(result || new Map());setDownloading(false);update({disableClosing: false@@ -113,7 +113,7 @@ const DownloadAttachments = ({ close, attachments, isNote, update }) => {<Heading>{downloading? "Downloading attachments"- : result.size+ : result?.size? "Downloaded attachments": "Download attachments"}</Heading>@@ -126,7 +126,7 @@ const DownloadAttachments = ({ close, attachments, isNote, update }) => {>{progress.statusText}</Paragraph>- ) : result.size ? (+ ) : result?.size ? (<Paragraphstyle={{textAlign: "center"@@ -200,7 +200,7 @@ const DownloadAttachments = ({ close, attachments, isNote, update }) => {}}/>- {result.size ? (+ {result?.size ? (<Buttonstyle={{width: 250,