Skip to content

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

fix possible crash in settings

ammarahm-edac3d81cedb3a
diff --git a/apps/mobile/src/screens/settings/2fa.tsx b/apps/mobile/src/screens/settings/2fa.tsx
index 49c7bcf4d..4f731ba26 100644
--- a/apps/mobile/src/screens/settings/2fa.tsx
+++ b/apps/mobile/src/screens/settings/2fa.tsx
@@ -45,10 +45,10 @@ const TwoFactorAuth = ({ isSheet }: { isSheet: boolean }) => {
});
};
- const mfaSettingsList = user?.mfa.isEnabled
+ const mfaSettingsList = user?.mfa?.isEnabled
? [
{
- name: user.mfa.secondaryMethod
+ name: user.mfa?.secondaryMethod
? 'Reconfigure fallback 2FA method'
: 'Add fallback 2FA method',
func: () => {