Skip to content

Commit

Permalink
31208 - Fix app error on chat bubble click from OD
Browse files Browse the repository at this point in the history
  • Loading branch information
zukilover committed Nov 14, 2023
1 parent 2c7062b commit 4e2c9bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ function getLastClosedReportAction(reportActions: ReportActions | null): OnyxEnt
* 4. We will get the second last action from filtered actions because the last
* action is always the created action
*/
function getFirstVisibleReportActionID(sortedReportActions: ReportAction[], isOffline: boolean): string {
function getFirstVisibleReportActionID(sortedReportActions: ReportAction[] = [], isOffline = false): string {
const sortedFilterReportActions = sortedReportActions.filter((action) => !isDeletedAction(action) || (action?.childVisibleActionCount ?? 0) > 0 || isOffline);
return sortedFilterReportActions.length > 1 ? sortedFilterReportActions[sortedFilterReportActions.length - 2].reportActionID : '';
}
Expand Down

0 comments on commit 4e2c9bb

Please sign in to comment.