Use error constant from the class
This commit is contained in:
parent
f79b777dd4
commit
d1e2418b75
1 changed files with 3 additions and 1 deletions
|
@ -19,6 +19,8 @@ import sdk from '../../../../index';
|
||||||
import MatrixClientPeg from '../../../../MatrixClientPeg';
|
import MatrixClientPeg from '../../../../MatrixClientPeg';
|
||||||
import Modal from '../../../../Modal';
|
import Modal from '../../../../Modal';
|
||||||
|
|
||||||
|
import { MatrixClient } from 'matrix-js-sdk';
|
||||||
|
|
||||||
import { _t } from '../../../../languageHandler';
|
import { _t } from '../../../../languageHandler';
|
||||||
|
|
||||||
const RESTORE_TYPE_PASSPHRASE = 0;
|
const RESTORE_TYPE_PASSPHRASE = 0;
|
||||||
|
@ -185,7 +187,7 @@ export default React.createClass({
|
||||||
title = _t("Error");
|
title = _t("Error");
|
||||||
content = _t("Unable to load backup status");
|
content = _t("Unable to load backup status");
|
||||||
} else if (this.state.restoreError) {
|
} else if (this.state.restoreError) {
|
||||||
if (this.state.restoreError.errcode === MatrixClientPeg.get().RESTORE_BACKUP_ERROR_BAD_KEY) {
|
if (this.state.restoreError.errcode === MatrixClient.RESTORE_BACKUP_ERROR_BAD_KEY) {
|
||||||
if (this.state.restoreType === RESTORE_TYPE_RECOVERYKEY) {
|
if (this.state.restoreType === RESTORE_TYPE_RECOVERYKEY) {
|
||||||
title = _t("Recovery Key Mismatch");
|
title = _t("Recovery Key Mismatch");
|
||||||
content = <div>
|
content = <div>
|
||||||
|
|
Loading…
Reference in a new issue