Skip to content

Commit

Permalink
Fixed some deprecated eslints
Browse files Browse the repository at this point in the history
  • Loading branch information
gedu committed Sep 17, 2024
1 parent 2f0e209 commit b6b893b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ function isActionOfType<T extends ReportActionName[]>(

function getOriginalMessage<T extends ReportActionName>(reportAction: OnyxInputOrEntry<ReportAction<T>>): OriginalMessage<T> | undefined {
if (!Array.isArray(reportAction?.message)) {
return reportAction?.message ?? reportAction?.originalMessage;
return reportAction?.message ?? getOriginalMessage(reportAction);
}
return reportAction.originalMessage;
return getOriginalMessage(reportAction);
}

function isExportIntegrationAction(reportAction: OnyxInputOrEntry<ReportAction>): boolean {
Expand Down Expand Up @@ -591,7 +591,7 @@ function isReportActionDeprecated(reportAction: OnyxEntry<ReportAction>, key: st

// HACK ALERT: We're temporarily filtering out any reportActions keyed by sequenceNumber
// to prevent bugs during the migration from sequenceNumber -> reportActionID
if (String(reportAction.sequenceNumber) === key) {
if (String(reportAction.reportActionID) === key) {
Log.info('Front-end filtered out reportAction keyed by sequenceNumber!', false, reportAction);
return true;
}
Expand Down Expand Up @@ -1696,7 +1696,7 @@ function isCardIssuedAction(reportAction: OnyxEntry<ReportAction>) {
}

function getCardIssuedMessage(reportAction: OnyxEntry<ReportAction>, shouldRenderHTML = false) {
const assigneeAccountID = (reportAction?.originalMessage as IssueNewCardOriginalMessage)?.assigneeAccountID;
const assigneeAccountID = (getOriginalMessage(reportAction) as IssueNewCardOriginalMessage)?.assigneeAccountID ?? -1;
const assigneeDetails = PersonalDetailsUtils.getPersonalDetailsByIDs([assigneeAccountID], currentUserAccountID ?? -1)[0];

const assignee = shouldRenderHTML ? `<mention-user accountID="${assigneeAccountID}"/>` : assigneeDetails?.firstName ?? assigneeDetails.login ?? '';
Expand Down

0 comments on commit b6b893b

Please sign in to comment.