Skip to content

Commit

Permalink
Merge pull request #10236 from Expensify/marcaaron-fixShouldComponent…
Browse files Browse the repository at this point in the history
…UpdateCrash

Fix `shouldComponentUpdate()` crash in `ReportActionsView`
  • Loading branch information
cristipaval authored Aug 8, 2022
2 parents 97eb8bb + ee8a2f3 commit 82d14eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/home/report/ReportActionsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ class ReportActionsView extends React.Component {
}

// If the new marker has changed places, update the component.
if (nextProps.report.newMarkerSequenceNumber !== this.props.report.newMarkerSequenceNumber) {
if (lodashGet(nextProps.report, 'newMarkerSequenceNumber') !== lodashGet(this.props.report, 'newMarkerSequenceNumber')) {
return true;
}

if (nextProps.network.isOffline !== this.props.network.isOffline) {
if (lodashGet(nextProps.network, 'isOffline') !== lodashGet(this.props.network, 'isOffline')) {
return true;
}

Expand Down Expand Up @@ -188,7 +188,7 @@ class ReportActionsView extends React.Component {
return true;
}

if (this.props.report.hasOutstandingIOU !== nextProps.report.hasOutstandingIOU) {
if (lodashGet(this.props.report, 'hasOutstandingIOU') !== lodashGet(nextProps.report, 'hasOutstandingIOU')) {
return true;
}

Expand Down

0 comments on commit 82d14eb

Please sign in to comment.