diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/who_to_follow_panel/who_to_follow_panel.js | 6 | ||||
| -rw-r--r-- | src/services/api/api.service.js | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/components/who_to_follow_panel/who_to_follow_panel.js b/src/components/who_to_follow_panel/who_to_follow_panel.js index 5e204001..a56a27ea 100644 --- a/src/components/who_to_follow_panel/who_to_follow_panel.js +++ b/src/components/who_to_follow_panel/who_to_follow_panel.js @@ -1,12 +1,12 @@ import apiService from '../../services/api/api.service.js' import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' -import _ from 'lodash' +import { shuffle } from 'lodash' function showWhoToFollow (panel, reply) { - _.shuffle(reply) + const shuffled = shuffle(reply) panel.usersToFollow.forEach((toFollow, index) => { - let user = reply[index] + let user = shuffled[index] let img = user.avatar || '/images/avi.png' let name = user.acct diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 2b1ef5df..776d8dae 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -129,13 +129,14 @@ const updateBanner = ({credentials, params}) => { // location // description 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 const form = new FormData() each(params, (value, key) => { - /* Always include description, no_rich_text and locked, because it might be empty or false */ - if (key === 'description' || key === 'locked' || key === 'no_rich_text' || value) { + if (fields.includes(key) || value) { form.append(key, value) } }) |
