From 0563e88eb85f95edbe2ab2720c90cd93b10b1395 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Mon, 27 Jul 2026 16:52:54 +1200 Subject: [PATCH] fix: hide "Forward as attachment" in overflow menu when blobId missing The overflow menu ("...") showed "Forward as attachment" whenever the handler was provided, regardless of whether the open email has a blobId. If it doesn't, handleForwardAsAttachment immediately no-ops (buildForwardAsAttachmentPayload returns null), so the item was clickable but did nothing - inconsistent with the list context menu's version, which is already disabled in that case (!onForwardAsAttachment || !email.blobId). Gate both occurrences (desktop and mobile layouts) on email?.blobId too, matching the context menu's behavior. Caught by GitHub Copilot's automated PR review. --- components/email/email-viewer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/email/email-viewer.tsx b/components/email/email-viewer.tsx index b95e019e..0aa7fb97 100644 --- a/components/email/email-viewer.tsx +++ b/components/email/email-viewer.tsx @@ -3344,7 +3344,7 @@ export function EmailViewer({ )}
{/* Forward as attachment */} - {onForwardAsAttachment && ( + {onForwardAsAttachment && email?.blobId && ( )}
- {onForwardAsAttachment && ( + {onForwardAsAttachment && email?.blobId && (