MoreFollows: count can never be negative, fixes #146

This commit is contained in:
Alex Gleason 2020-06-07 15:11:41 -05:00
parent 886b241433
commit 74a01a7b3e
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 1 deletions

View File

@ -33,5 +33,5 @@ export const isModerator = account => (
export const getFollowDifference = (state, accountId, type) => {
const listSize = state.getIn(['user_lists', type, accountId, 'items'], ImmutableList()).size;
const counter = state.getIn(['accounts_counters', accountId, `${type}_count`], 0);
return counter - listSize;
return Math.max(counter - listSize, 0);
};