Skip to content

Commit

Permalink
Merge pull request #34551 from dukenv0307/fix/31748
Browse files Browse the repository at this point in the history
Fallback report action created if reportActions is empty
  • Loading branch information
MonilBhavsar authored Jan 24, 2024
2 parents ecf641e + 3016cf2 commit c0fbb97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ function markCommentAsUnread(reportID: string, reportActionCreated: string) {
}, null);

// If no action created date is provided, use the last action's from other user
const actionCreationTime = reportActionCreated || (latestReportActionFromOtherUsers?.created ?? DateUtils.getDBTime(0));
const actionCreationTime = reportActionCreated || (latestReportActionFromOtherUsers?.created ?? allReports?.[reportID]?.lastVisibleActionCreated ?? DateUtils.getDBTime(0));

// We subtract 1 millisecond so that the lastReadTime is updated to just before a given reportAction's created date
// For example, if we want to mark a report action with ID 100 and created date '2014-04-01 16:07:02.999' unread, we set the lastReadTime to '2014-04-01 16:07:02.998'
Expand Down

0 comments on commit c0fbb97

Please sign in to comment.