web: my profile: fix onBack navigation in updateUserForm

This commit is contained in:
Vladislav Makhov 2021-06-07 14:28:14 +03:00
parent 0af3acb46b
commit b6fa346fc0

View File

@ -303,9 +303,9 @@ class UpdateUserForm extends React.Component {
}
onCancel() {
const { filter, setFilter, history } = this.props;
const { filter, setFilter, history, personal } = this.props;
if (document.referrer) {
if (document.referrer || personal) {
history.goBack();
} else {
history.push(combineUrl(AppServerConfig.proxyURL, config.homepage));
@ -943,6 +943,7 @@ export default withRouter(
getUserPhoto: peopleStore.targetUserStore.getUserPhoto,
disableProfileType: peopleStore.targetUserStore.getDisableProfileType,
isSelf: peopleStore.targetUserStore.isMe,
personal: auth.settingsStore.personal,
}))(
observer(
withTranslation(["ProfileAction", "Common", "Translations"])(