fix: read the send hook count safely in the composer's Options menu

This commit is contained in:
Linus Rath
2026-11-04 08:42:39 +01:00
parent 472ee53d88
commit 1fdfffad45
+1 -1
View File
@@ -5841,7 +5841,7 @@ export function EmailComposer({
)}
{/* Encrypting is a crypto plugin's job (S/MIME, PGP). Without
one, say where to get it rather than offer nothing. */}
{emailHooks.onComposeSend.size === 0 && isFeatureEnabled('pluginsEnabled') && !ownWindow && (
{(emailHooks.onComposeSend?.size ?? 0) === 0 && isFeatureEnabled('pluginsEnabled') && !ownWindow && (
<ComposerToolbarMenuItem
icon={Lock}
muted