Skip to content

Commit

Permalink
Merge pull request #27955 from janicduplessis/@janic/iou-report
Browse files Browse the repository at this point in the history
Avoid re-render when no iouReport
  • Loading branch information
mountiny authored Sep 22, 2023
2 parents 6836eaf + 94ae3f7 commit 171259c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/home/report/ReportActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,11 @@ export default compose(
key: ONYXKEYS.PREFERRED_EMOJI_SKIN_TONE,
},
iouReport: {
key: ({action}) => `${ONYXKEYS.COLLECTION.REPORT}${ReportActionsUtils.getIOUReportIDFromReportActionPreview(action)}`,
key: ({action}) => {
const iouReportID = ReportActionsUtils.getIOUReportIDFromReportActionPreview(action);
return iouReportID ? `${ONYXKEYS.COLLECTION.REPORT}${iouReportID}` : undefined;
},
initialValue: {},
},
emojiReactions: {
key: ({action}) => `${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${action.reportActionID}`,
Expand Down

0 comments on commit 171259c

Please sign in to comment.