mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-21 09:31:17 -08:00
Merge pull request #143 from SableClient/fix/broken-image-empty-body
Fix images with empty bodies display as broken.
This commit is contained in:
2 files changed
+7
-1
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
---
|
||||
|
||||
Fix images without an empty body display as "Broken Message"
|
||||
@@ -120,8 +120,9 @@ function RenderMessageContentInternal({
|
||||
);
|
||||
|
||||
const renderCaption = () => {
|
||||
const hasCaption = content.body && content.body.trim().length > 0;
|
||||
if (captionPosition === CaptionPosition.Hidden) return null;
|
||||
if (content.filename && content.filename !== content.body) {
|
||||
if (hasCaption && content.filename && content.filename !== content.body) {
|
||||
if (captionPosition !== CaptionPosition.Inline)
|
||||
return (
|
||||
<MText
|
||||
|
||||
Reference in new issue
Block a user