From 27c4f08de7b8734e8083c00bea55d87d98c70a1d Mon Sep 17 00:00:00 2001 From: Robert Daly Date: Sat, 14 Jan 2023 21:29:34 -0500 Subject: [PATCH] Update src/components/AttachmentCarousel/index.js Co-authored-by: Carlos Martins --- src/components/AttachmentCarousel/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/AttachmentCarousel/index.js b/src/components/AttachmentCarousel/index.js index 12af473226af..392bb972520f 100644 --- a/src/components/AttachmentCarousel/index.js +++ b/src/components/AttachmentCarousel/index.js @@ -116,8 +116,7 @@ class AttachmentCarousel extends React.Component { const attachments = []; _.forEach(actions, ({originalMessage}) => { if (originalMessage && originalMessage.html) { - const matchesIt = originalMessage.html.matchAll(CONST.REGEX.ATTACHMENT_DATA); - const matches = [...matchesIt]; + const matches = [...originalMessage.html.matchAll(CONST.REGEX.ATTACHMENT_DATA]; // matchAll captured both source url and name of the attachment if (matches.length === 2) {