Skip to content

Commit

Permalink
Merge pull request #52757 from mkzie2/mkzie2-issue/52747
Browse files Browse the repository at this point in the history
Fix compare image function

(cherry picked from commit 445fc42)

(CP triggered by chiragsalian)
  • Loading branch information
Gonals authored and OSBotify committed Nov 19, 2024
1 parent 7a0690a commit 90dda0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Attachments/AttachmentCarousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function AttachmentCarousel({report, source, onNavigate, setDownloadButtonVisibi
setShouldShowArrows(true);
}, [canUseTouchScreen, page, setShouldShowArrows]);

const compareImage = useCallback((attachment: Attachment) => attachment.source === source && attachment.attachmentLink === attachmentLink, [attachmentLink, source]);
const compareImage = useCallback((attachment: Attachment) => attachment.source === source && (!attachmentLink || attachment.attachmentLink === attachmentLink), [attachmentLink, source]);

useEffect(() => {
const parentReportAction = report.parentReportActionID && parentReportActions ? parentReportActions[report.parentReportActionID] : undefined;
Expand Down

0 comments on commit 90dda0d

Please sign in to comment.