Skip to content

Commit

Permalink
fix: remaining issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispader committed Jun 12, 2024
1 parent 03f243d commit e115cdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ function getAllReportErrors(report: OnyxEntry<Report>, reportActions: OnyxEntry<

return Object.assign(prevReportActionErrors, action.errors);
}, {});
const parentReportAction: OnyxEntry<ReportAction> | null =
!report?.parentReportID || !report?.parentReportActionID ? null : allReportActions?.[report.parentReportID ?? '']?.[report.parentReportActionID ?? ''] ?? null;
const parentReportAction: OnyxEntry<ReportAction> =
!report?.parentReportID || !report?.parentReportActionID ? undefined : allReportActions?.[report.parentReportID ?? '']?.[report.parentReportActionID ?? ''];

if (ReportActionUtils.wasActionTakenByCurrentUser(parentReportAction) && ReportActionUtils.isTransactionThread(parentReportAction)) {
const transactionID = parentReportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? parentReportAction?.originalMessage?.IOUTransactionID : null;
Expand Down
4 changes: 2 additions & 2 deletions src/libs/actions/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ Onyx.connect({
},
});

let myPersonalDetails: OnyxEntry<OnyxPersonalDetails> | EmptyObject | null = {};
let myPersonalDetails: OnyxEntry<OnyxPersonalDetails> | EmptyObject = {};
Onyx.connect({
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
callback: (value) => {
if (!value || currentUserAccountID === -1) {
return;
}

myPersonalDetails = value[currentUserAccountID];
myPersonalDetails = value[currentUserAccountID] ?? {};
},
});

Expand Down

0 comments on commit e115cdc

Please sign in to comment.