diff --git a/packages/html-reporter/src/testResultView.tsx b/packages/html-reporter/src/testResultView.tsx
index f8aa01fd71..c60d6c009b 100644
--- a/packages/html-reporter/src/testResultView.tsx
+++ b/packages/html-reporter/src/testResultView.tsx
@@ -80,7 +80,7 @@ export const TestResultView: React.FC<{
}> = ({ result, anchor }) => {
const { screenshots, videos, traces, otherAttachments, diffs, htmls } = React.useMemo(() => {
- const attachments = result?.attachments || [];
+ const attachments = result.attachments;
const screenshots = new Set(attachments.filter(a => getAttachmentCategory(a) === 'screenshot'));
const videos = attachments.filter(a => getAttachmentCategory(a) === 'video');
const traces = attachments.filter(a => getAttachmentCategory(a) === 'trace');
@@ -88,7 +88,7 @@ export const TestResultView: React.FC<{
const otherAttachments = attachments.filter(a => getAttachmentCategory(a) === 'other');
const diffs = groupImageDiffs(screenshots);
return { screenshots: [...screenshots], videos, traces, otherAttachments, diffs, htmls };
- }, [result]);
+ }, [result.attachments]);
const videoRef = React.useRef(null);
const imageDiffRef = React.useRef(null);