fix: crash on closing signup dialog

This commit is contained in:
thecodrr
2020-12-31 13:24:25 +05:00
parent 8bc9b95ea3
commit aa1aa16dda

View File

@@ -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();
}}
/>
));