Merge pull request #3862 from matrix-org/dbkr/catch_exception_cancel_passphrase

Catch exception if passphrase dialog cancelled
pull/21833/head
David Baker 2020-01-17 15:43:21 +00:00 committed by GitHub
commit 6beae0ed39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 6 deletions

View File

@ -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 = () => {