Skip to content

Commit

Permalink
correctly access the report data
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Apr 17, 2024
1 parent 1f694e2 commit c711542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/TaskUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function getTaskReportActionMessage(action: OnyxEntry<ReportAction>): Pick<Messa
}

function getTaskTitle(taskReportID: string, fallbackTitle = ''): string {
const taskReport = allReports?.[taskReportID] ?? {};
const taskReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${taskReportID}`] ?? {};
// We need to check for reportID, not just reportName, because when a receiver opens the task for the first time,
// an optimistic report is created with the only property – reportName: 'Chat report',
// and it will be displayed as the task title without checking for reportID to be present.
Expand Down

0 comments on commit c711542

Please sign in to comment.