Skip to content

Commit

Permalink
update the position of avatar check
Browse files Browse the repository at this point in the history
  • Loading branch information
hungvu193 committed May 31, 2023
1 parent cf911e2 commit fa62c00
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 @@ -127,9 +127,6 @@ class ReportActionsView extends React.Component {
}

shouldComponentUpdate(nextProps, nextState) {
const policy = this.props.policies[`${ONYXKEYS.COLLECTION.POLICY}${this.props.report.policyID}`];
const nextPolicy = nextProps.policies[`${ONYXKEYS.COLLECTION.POLICY}${nextProps.report.policyID}`];

if (!_.isEqual(nextProps.reportActions, this.props.reportActions)) {
this.mostRecentIOUReportActionID = ReportActionsUtils.getMostRecentIOURequestActionID(nextProps.reportActions);
return true;
Expand Down Expand Up @@ -179,6 +176,9 @@ class ReportActionsView extends React.Component {
return true;
}

const policy = this.props.policies[`${ONYXKEYS.COLLECTION.POLICY}${this.props.report.policyID}`];
const nextPolicy = nextProps.policies[`${ONYXKEYS.COLLECTION.POLICY}${nextProps.report.policyID}`];

if (lodashGet(policy, 'avatar') !== lodashGet(nextPolicy, 'avatar')) {
return true;
}
Expand Down

0 comments on commit fa62c00

Please sign in to comment.