diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 2611dae20d7ec..7eb7e01d6edd6 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -1238,6 +1238,11 @@ function readNewestAction(reportID: string, shouldResetUnreadMarker = false) { * Sets the last read time on a report */ function markCommentAsUnread(reportID: string, reportActionCreated: string) { + if (reportID === '-1') { + Log.warn('7339cd6c-3263-4f89-98e5-730f0be15784 Invalid report passed to MarkCommentAsUnread. Not calling the API because it wil fail.'); + return; + } + const reportActions = allReportActions?.[reportID]; // Find the latest report actions from other users