Skip to content

Commit

Permalink
Add another check to prevent a needless comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
youssef-lr committed Oct 19, 2023
1 parent e9f86b6 commit 704af3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3291,7 +3291,7 @@ function canFlagReportAction(reportAction, reportID) {

if (ReportActionsUtils.isWhisperAction(reportAction)) {
// Allow flagging welcome message whispers as they can be set by any room creator
if (lodashGet(reportAction, 'originalMessage.html') === report.welcomeMessage && !isCurrentUserAction) {
if (report.welcomeMessage && !isCurrentUserAction && lodashGet(reportAction, 'originalMessage.html') === report.welcomeMessage) {
return true;
}

Expand Down

0 comments on commit 704af3e

Please sign in to comment.