fix: no attachment broadcast fix
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user