Catch exception in checkTerms if no ID server

This line will throw if it can't get to the ID server, so move it
inside the catch block too.
pull/21833/head
David Baker 2020-01-17 16:26:47 +00:00
parent 1a6be3addd
commit 03cb76861f
1 changed files with 1 additions and 1 deletions

View File

@ -160,8 +160,8 @@ export default class GeneralUserSettingsTab extends React.Component {
// for free. So we might as well use that for our own purposes. // for free. So we might as well use that for our own purposes.
const idServerUrl = MatrixClientPeg.get().getIdentityServerUrl(); const idServerUrl = MatrixClientPeg.get().getIdentityServerUrl();
const authClient = new IdentityAuthClient(); const authClient = new IdentityAuthClient();
const idAccessToken = await authClient.getAccessToken({ check: false });
try { try {
const idAccessToken = await authClient.getAccessToken({ check: false });
await startTermsFlow([new Service( await startTermsFlow([new Service(
SERVICE_TYPES.IS, SERVICE_TYPES.IS,
idServerUrl, idServerUrl,