Skip to content

Commit

Permalink
added comment to reducer
Browse files Browse the repository at this point in the history
  • Loading branch information
JediWattson committed Dec 7, 2022
1 parent c6e5b53 commit cdd60bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/AttachmentCarousel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ class AttachmentCarousel extends React.Component {
makeStateWithReports() {
let page;
const actionsArr = ReportActionsUtils.getSortedReportActions(_.values(this.props.reportActions), true);

/**
* calling reducer will filter out attachments, determine the index of opened attachment,
* and retrieve the src url and name of attachements
*/
const attachments = _.reduce(actionsArr, (attachmentsAccumulator, {originalMessage}) => {
if (originalMessage && originalMessage.html) {
const matchesIt = originalMessage.html.matchAll(CONST.REGEX.ATTACHMENT_DATA);
Expand Down

0 comments on commit cdd60bc

Please sign in to comment.