From 1af67c3a256e2b86d3d30a866c6e57497057a795 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 10 Mar 2023 13:46:20 -0600 Subject: [PATCH] members_count will never be null --- .../__tests__/group-member-count.test.tsx | 14 -------------- .../group/components/group-member-count.tsx | 4 ---- 2 files changed, 18 deletions(-) diff --git a/app/soapbox/features/group/components/__tests__/group-member-count.test.tsx b/app/soapbox/features/group/components/__tests__/group-member-count.test.tsx index 86e9baac87..9a26c27296 100644 --- a/app/soapbox/features/group/components/__tests__/group-member-count.test.tsx +++ b/app/soapbox/features/group/components/__tests__/group-member-count.test.tsx @@ -9,20 +9,6 @@ import GroupMemberCount from '../group-member-count'; let group: Group; describe('', () => { - describe('without support for "members_count"', () => { - beforeEach(() => { - group = normalizeGroup({ - members_count: undefined, - }); - }); - - it('should return null', () => { - render(); - - expect(screen.queryAllByTestId('group-member-count')).toHaveLength(0); - }); - }); - describe('with support for "members_count"', () => { describe('with 1 member', () => { beforeEach(() => { diff --git a/app/soapbox/features/group/components/group-member-count.tsx b/app/soapbox/features/group/components/group-member-count.tsx index e4dd33e54c..6dc9361817 100644 --- a/app/soapbox/features/group/components/group-member-count.tsx +++ b/app/soapbox/features/group/components/group-member-count.tsx @@ -10,10 +10,6 @@ interface IGroupMemberCount { } const GroupMemberCount = ({ group }: IGroupMemberCount) => { - if (typeof group.members_count === 'undefined') { - return null; - } - return ( {shortNumberFormat(group.members_count)}