regression: fix blank 'Name' field in Profile View when modifying other fields (#5101)

This commit is contained in:
Reinaldo Neto 2023-06-19 20:41:04 -03:00 committed by GitHub
parent 4880c47e9b
commit 557b4643fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -232,8 +232,10 @@ class ProfileView extends React.Component<IProfileViewProps, IProfileViewState>
if (result) {
logEvent(events.PROFILE_SAVE_CHANGES);
params.name = params.realname;
delete params.realname;
if ('realname' in params) {
params.name = params.realname;
delete params.realname;
}
if (customFields) {
dispatch(setUser({ customFields, ...params }));
} else {