Skip to content

Commit

Permalink
Avoid re-render when no iouReport
Browse files Browse the repository at this point in the history
  • Loading branch information
janicduplessis committed Sep 21, 2023
1 parent ee023d8 commit 94ae3f7
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 94ae3f7

Please sign in to comment.