From ed910fa1cae6597ea317f24bd7d4d60e4f6f4d5e Mon Sep 17 00:00:00 2001 From: BhuvaneshPatil Date: Mon, 19 Aug 2024 20:41:26 +0530 Subject: [PATCH] fix: filter non number values --- src/libs/ReportUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 5c50322a17d82..905b049ea7da8 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1,6 +1,6 @@ import {format} from 'date-fns'; import {Str} from 'expensify-common'; -import {isEmpty} from 'lodash'; +import {isEmpty, isNumber} from 'lodash'; import lodashEscape from 'lodash/escape'; import lodashFindLastIndex from 'lodash/findLastIndex'; import lodashIntersection from 'lodash/intersection'; @@ -2083,7 +2083,7 @@ function getParticipantsAccountIDsForDisplay(report: OnyxEntry, shouldEx }); } - return participantsEntries.map(([accountID]) => Number(accountID)); + return participantsEntries.map(([accountID]) => Number(accountID)).filter((accountID) => isNumber(accountID)); } function getParticipantsList(report: Report, personalDetails: OnyxEntry, isRoomMembersList = false): number[] {