Merge pull request #5791 from thermaq/patch-1

Fix password change popup message
This commit is contained in:
Travis Ralston 2021-03-26 00:07:50 -06:00 committed by GitHub
commit 264e24fc35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -206,10 +206,10 @@ export default class GeneralUserSettingsTab extends React.Component {
_onPasswordChangeError = (err) => {
// TODO: Figure out a design that doesn't involve replacing the current dialog
let errMsg = err.error || "";
let errMsg = err.error || err.message || "";
if (err.httpStatus === 403) {
errMsg = _t("Failed to change password. Is your password correct?");
} else if (err.httpStatus) {
} else if (!errMsg) {
errMsg += ` (HTTP status ${err.httpStatus})`;
}
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");