Skip to content

Commit

Permalink
fix: resolve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kubabutkiewicz committed Oct 9, 2023
1 parent e74d724 commit 5906975
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,8 @@ function getAllReportActions(reportID: string): ReportActions {
function isReportActionAttachment(reportAction: OnyxEntry<ReportAction>): boolean {
const message = reportAction?.message?.[0];

if (reportAction && Object.hasOwn(reportAction, 'isAttachment')) {
// The condition asserts "isAttachment" exists.
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return reportAction.isAttachment!;
if (reportAction && 'isAttachment' in reportAction) {
return reportAction.isAttachment ?? false;
}

if (message) {
Expand Down

0 comments on commit 5906975

Please sign in to comment.