Skip to content

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

mobile: check backup was successful

Ammar Ahmeda070bc46adf7
diff --git a/apps/mobile/app/components/auth/change-password.js b/apps/mobile/app/components/auth/change-password.js
index c6c5389da..d078144bb 100644
--- a/apps/mobile/app/components/auth/change-password.js
+++ b/apps/mobile/app/components/auth/change-password.js
@@ -66,7 +66,9 @@ export const ChangePassword = () => {
}
setLoading(true);
try {
- await BackupService.run(false, "change-password-dialog");
+ const result = await BackupService.run(false, "change-password-dialog");
+ if (!result) throw new Error("Failed to create backup");
+
await db.user.clearSessions();
await db.user.changePassword(oldPassword.current, password.current);
ToastEvent.show({