Skip to content

Commit

Permalink
fix(debug mode): missing reportID in optimistic report
Browse files Browse the repository at this point in the history
  • Loading branch information
pac-guerreiro committed Oct 24, 2024
1 parent a3b1513 commit 4b2d8ad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,10 +767,13 @@ function openReport(
return;
}

const optimisticReport = reportActionsExist(reportID)
? {}
const optimisticReport: Report = reportActionsExist(reportID)
? {
reportID,
}
: {
reportName: ReportConnection.getAllReports()?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`]?.reportName ?? CONST.REPORT.DEFAULT_REPORT_NAME,
reportID,
};

const optimisticData: OnyxUpdate[] = [
Expand Down

0 comments on commit 4b2d8ad

Please sign in to comment.