Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/actions/ActionsReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ function updateReportWithNewAction(reportID, reportAction) {
// written by the user). If the action doesn't exist, then update the unread flag on the report so the user
// knows there is a new comment
.then((reportHistory) => {
if (!reportHistory[reportAction.sequenceNumber]) {
if (reportHistory && !reportHistory[reportAction.sequenceNumber]) {
Ion.merge(`${IONKEYS.REPORT}_${reportID}`, {hasUnread: true});
}
return reportHistory;
return reportHistory || {};
})

// Put the report action from pusher into the history, it's OK to overwrite it if it already exists
Expand Down