Fix: Can't remove all profile fields
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
6456737d8a
commit
1fa85d0dd6
1 changed files with 4 additions and 1 deletions
|
@ -198,7 +198,10 @@ const EditProfile: React.FC = () => {
|
|||
const handleSubmit: React.FormEventHandler = (event) => {
|
||||
const promises = [];
|
||||
|
||||
promises.push(dispatch(patchMe(data, true)));
|
||||
const params = { ...data };
|
||||
if (params.fields_attributes?.length === 0) params.fields_attributes = [{ name: '', value: '' }];
|
||||
|
||||
promises.push(dispatch(patchMe(params, true)));
|
||||
|
||||
if (features.muteStrangers) {
|
||||
promises.push(
|
||||
|
|
Loading…
Reference in a new issue