Use MatrixClientPeg::safeGet in src/components/views/* (#10987)
This commit is contained in:
parent
4243847f4f
commit
280f6a9d93
81 changed files with 265 additions and 250 deletions
|
@ -93,7 +93,7 @@ export default class ChangePassword extends React.Component<IProps, IState> {
|
|||
}
|
||||
|
||||
private async onChangePassword(oldPassword: string, newPassword: string): Promise<void> {
|
||||
const cli = MatrixClientPeg.get();
|
||||
const cli = MatrixClientPeg.safeGet();
|
||||
|
||||
// if the server supports it then don't sign user out of all devices
|
||||
const serverSupportsControlOfDevicesLogout = await cli.doesServerSupportLogoutDevices();
|
||||
|
@ -235,7 +235,7 @@ export default class ChangePassword extends React.Component<IProps, IState> {
|
|||
typeof ExportE2eKeysDialog
|
||||
>,
|
||||
{
|
||||
matrixClient: MatrixClientPeg.get(),
|
||||
matrixClient: MatrixClientPeg.safeGet(),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue