Skip to content

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

fix: crash on closing signup dialog

thecodrraa1aa16dda8a
diff --git a/apps/web/src/components/dialogs/signupdialog.js b/apps/web/src/components/dialogs/signupdialog.js
index 5e0270199..4dd321bfb 100644
--- a/apps/web/src/components/dialogs/signupdialog.js
+++ b/apps/web/src/components/dialogs/signupdialog.js
@@ -65,10 +65,8 @@ function SignUpDialog(props) {
password: data.password,
});
await navigator.credentials.store(c);
- onClose();
- } else {
- onClose();
}
+ onClose(true);
})
.catch((e) => setError(e.message));
}}
@@ -100,9 +98,9 @@ function SignUpDialog(props) {
export function showSignUpDialog() {
return showDialog((perform) => (
<SignUpDialog
- onClose={async () => {
- perform(true);
- await showRecoveryKeyDialog();
+ onClose={async (res) => {
+ perform(res);
+ if (res) await showRecoveryKeyDialog();
}}
/>
));