Skip to content

Commit a908135

Browse files
committed
Fix: New message marker is not displayed on the first message in expense report
1 parent 2126290 commit a908135

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ function MoneyRequestReportActionsList({
326326
// Scan through each visible report action until we find the appropriate action to show the unread marker
327327
for (let index = startIndex; index >= endIndex; index--) {
328328
const reportAction = visibleReportActions.at(index);
329-
const nextAction = visibleReportActions.at(index - 1);
329+
const nextAction = index > 0 ? visibleReportActions.at(index - 1) : undefined;
330330
const isEarliestReceivedOfflineMessage = index === earliestReceivedOfflineMessageIndex;
331331

332332
const shouldDisplayNewMarker =

0 commit comments

Comments
 (0)