diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-15 14:41:49 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-15 14:47:39 +0100 |
commit | 1d5cbfa35680e5780d27a92a136ce3dbdeb90002 (patch) | |
tree | 8d0574eb0b85439f906f5589cd2126d2984dd077 /app/assets | |
parent | cc1eccc8bc6b6f49cef0f4cf6a74ced8f3262b54 (diff) |
Fix #449 - don't do relationships fetch for empty array of IDs
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/components/actions/accounts.jsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/components/actions/accounts.jsx b/app/assets/javascripts/components/actions/accounts.jsx index 7ae87f30e..e1519d7b5 100644 --- a/app/assets/javascripts/components/actions/accounts.jsx +++ b/app/assets/javascripts/components/actions/accounts.jsx @@ -486,6 +486,10 @@ export function expandFollowingFail(id, error) { export function fetchRelationships(account_ids) { return (dispatch, getState) => { + if (account_ids.length === 0) { + return; + } + dispatch(fetchRelationshipsRequest(account_ids)); api(getState).get(`/api/v1/accounts/relationships?${account_ids.map(id => `id[]=${id}`).join('&')}`).then(response => { |