Skip to content

Commit

Permalink
Fixed Bug steemit#3932
Browse files Browse the repository at this point in the history
Introduced a check on the 'settings' object (in Community Settings) so that it's not an empty object.  If no 'avatar_url' or 'cover_url' is set, the object will now reflect this.
  • Loading branch information
the-gorilla-steem committed Jan 28, 2025
1 parent a7fd665 commit 225479f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/components/modules/CommunitySettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ class CommunitySettings extends Component {
// Skip these keys
} else if (typeof this.state[k] === 'string') {
payload[k] = this.state[k].trim();
} else if (k === 'settings') {
const settingsCopy = { ...this.state[k] };
if (settingsCopy.avatar_url.trim() === '') {
settingsCopy.avatar_url = '';
}
if (settingsCopy.cover_url.trim() === '') {
settingsCopy.cover_url = '';
}
payload[k] = settingsCopy;
} else {
payload[k] = this.state[k];
}
Expand Down

0 comments on commit 225479f

Please # to comment.