Skip to content

Commit

Permalink
fix: additional crash
Browse files Browse the repository at this point in the history
  • Loading branch information
kubabutkiewicz committed Jan 29, 2024
1 parent 56fcd01 commit 76d6a9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Onyx.connect({

const lastReportActions: ReportActions = {};
const allSortedReportActions: Record<string, ReportAction[]> = {};
const allReportActions: Record<string, ReportActions> = {};
const allReportActions: Record<string, ReportActions | null> = {};
const visibleReportActionItems: ReportActions = {};
Onyx.connect({
key: ONYXKEYS.COLLECTION.REPORT_ACTIONS,
Expand Down Expand Up @@ -1387,7 +1387,7 @@ function getOptions(
const filteredReports = Object.values(reports ?? {}).filter((report) => {
const {parentReportID, parentReportActionID} = report ?? {};
const canGetParentReport = parentReportID && parentReportActionID && allReportActions;
const parentReportAction = canGetParentReport ? allReportActions[parentReportID][parentReportActionID] : null;
const parentReportAction = canGetParentReport ? allReportActions[parentReportID]?.[parentReportActionID] ?? null : null;
const doesReportHaveViolations = betas.includes(CONST.BETAS.VIOLATIONS) && ReportUtils.doesTransactionThreadHaveViolations(report, transactionViolations, parentReportAction);

return ReportUtils.shouldReportBeInOptionList({
Expand Down

0 comments on commit 76d6a9f

Please sign in to comment.