Skip to content

Commit

Permalink
Default to empty object in case report actions are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny committed Jan 20, 2023
1 parent 54f1706 commit a0bc604
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class ReportActionsList extends React.Component {
// Make sure the oldest report action loaded is not the first. This is so we do not show the
// skeleton view above the created action in a newly generated optimistic chat or one with not
// that many comments.
const lastReportAction = _.last(this.props.sortedReportActions);
const lastReportAction = _.last(this.props.sortedReportActions) || {};
if (this.props.report.isLoadingReportActions && lastReportAction.sequenceNumber > 0) {
return (
<ReportActionsSkeletonView
Expand Down

0 comments on commit a0bc604

Please sign in to comment.