Merge branch 'fix/hide-network-setting' into 'develop'

Always send "hide_network" when updating user profile

See merge request pleroma/pleroma-fe!471
This commit is contained in:
HJ 2019-01-24 12:15:46 +00:00
commit 9305dad005

View File

@ -129,13 +129,14 @@ const updateBanner = ({credentials, params}) => {
// location // location
// description // description
const updateProfile = ({credentials, params}) => { const updateProfile = ({credentials, params}) => {
// Always include these fields, because they might be empty or false
const fields = ['description', 'locked', 'no_rich_text', 'hide_network']
let url = PROFILE_UPDATE_URL let url = PROFILE_UPDATE_URL
const form = new FormData() const form = new FormData()
each(params, (value, key) => { each(params, (value, key) => {
/* Always include description, no_rich_text and locked, because it might be empty or false */ if (fields.includes(key) || value) {
if (key === 'description' || key === 'locked' || key === 'no_rich_text' || value) {
form.append(key, value) form.append(key, value)
} }
}) })