fix: no attachment broadcast fix

This commit is contained in:
gosangam
2026-08-29 18:56:45 +05:30
parent 03c8799f22
commit 0f382ed885
4 changed files with 18 additions and 5 deletions
+1 -1
View File
@@ -190,7 +190,7 @@ export function MessageGroup({
{/* An optimistic bubble for a captionless attachment has
nothing to draw until the server answers — say so rather
than render an empty box. */}
{m.pending && !m.body && m.attachments.length === 0 && (
{m.pending && !m.body && !m.attachments?.length && (
<span className="italic opacity-80">
Sending attachment…
</span>
+3 -1
View File
@@ -60,7 +60,9 @@ export function BroadcastModal() {
}
}, [item, dismissing]);
if (!item) return null;
// Guard on the shape, not just presence: a malformed payload must not put
// an empty modal over every page in the app.
if (!item?.id || !item.title) return null;
return (
<ResponsiveDialog