From 2957735a86a140cae46ef793530f754f9d6c7ab3 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 9 Feb 2021 16:00:16 -0800 Subject: [PATCH] getMembersCount: Return undefined when conversation has no members --- ts/models/conversations.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index d62a5de755b6..74b12be21aac 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -1412,9 +1412,9 @@ export class ConversationModel extends window.Backbone.Model< window.Signal.Data.updateConversation(this.attributes); } - getMembersCount(): number { + getMembersCount(): number | undefined { if (this.isPrivate()) { - return 1; + return undefined; } const memberList = this.get('membersV2') || this.get('members'); @@ -1429,7 +1429,7 @@ export class ConversationModel extends window.Backbone.Model< return temporaryMemberCount; } - return 0; + return undefined; } decrementMessageCount(): void {