From d69c5f6a1b2be338560217a21ef1f79c2c6f803f Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 17 Jan 2020 14:46:20 +0000 Subject: [PATCH] Catch exception if passphrase dialog cancelled As hopefully explained by comment --- .../structures/auth/CompleteSecurity.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/structures/auth/CompleteSecurity.js b/src/components/structures/auth/CompleteSecurity.js index 77f7fe26e4..b64f368908 100644 --- a/src/components/structures/auth/CompleteSecurity.js +++ b/src/components/structures/auth/CompleteSecurity.js @@ -40,12 +40,16 @@ export default class CompleteSecurity extends React.Component { onStartClick = async () => { const cli = MatrixClientPeg.get(); - await accessSecretStorage(async () => { - await cli.checkOwnCrossSigningTrust(); - }); - this.setState({ - phase: PHASE_DONE, - }); + try { + await accessSecretStorage(async () => { + await cli.checkOwnCrossSigningTrust(); + }); + this.setState({ + phase: PHASE_DONE, + }); + } catch (e) { + // this will throw if the user hits cancel, so ignore + } } onSkipClick = () => {