regression: fix blank 'Name' field in Profile View when modifying other fields (#5101)
This commit is contained in:
parent
4880c47e9b
commit
557b4643fe
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue