Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: fix crash during backup

Ammar Ahmed1fbd2efb9206
diff --git a/apps/mobile/app/services/backup.js b/apps/mobile/app/services/backup.js
index 1db650e6c..eb22f15e5 100644
--- a/apps/mobile/app/services/backup.js
+++ b/apps/mobile/app/services/backup.js
@@ -252,7 +252,7 @@ async function run(progress = false, context) {
} catch (e) {
ToastManager.error(e, "Backup failed", context || "global");
- if (e.message.includes("android.net.Uri") && androidBackupDirectory) {
+ if (e?.message?.includes("android.net.Uri") && androidBackupDirectory) {
SettingsService.setProperty("backupDirectoryAndroid", null);
return run(progress, context);
}