From aa1aa16dda8a69565e4567862d092e9a39d0fc08 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Thu, 31 Dec 2020 13:24:25 +0500 Subject: [PATCH] fix: crash on closing signup dialog --- apps/web/src/components/dialogs/signupdialog.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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) => ( { - perform(true); - await showRecoveryKeyDialog(); + onClose={async (res) => { + perform(res); + if (res) await showRecoveryKeyDialog(); }} /> ));