fix statuses with empty content text (#446)

fixes #445
This commit is contained in:
Nolan Lawson 2018-08-19 11:31:02 -07:00 committed by GitHub
parent 1aeb57fb57
commit f732bd44ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -21,7 +21,7 @@
{#if !showContent}
<StatusMentions {...params} />
{/if}
{#if showContent || contentPreloaded}
{#if content && (showContent || contentPreloaded)}
<StatusContent {...params} shown={showContent}/>
{/if}
{#if showMedia }
@ -223,6 +223,7 @@
timelineType !== 'search' && 'status-in-timeline',
isStatusInOwnThread && 'status-in-own-thread'
)),
content: ({ originalStatus }) => originalStatus.content || '',
showContent: ({ spoilerText, spoilerShown }) => !spoilerText || spoilerShown,
params: ({ notification, notificationId, status, statusId, timelineType,
account, accountId, uuid, isStatusInNotification, isStatusInOwnThread,

View File

@ -79,13 +79,13 @@
shown && 'shown'
)
},
content: ({ originalStatus }) => originalStatus.content,
content: ({ originalStatus }) => (originalStatus.content || ''),
emojis: ({ originalStatus }) => originalStatus.emojis,
massagedContent: ({ content, emojis, $autoplayGifs }) => {
content = emojifyText(content, emojis, $autoplayGifs)
// GNU Social and Pleroma don't add <p> tags
if (!content.startsWith('<p>')) {
if (content && !content.startsWith('<p>')) {
content = `<p>${content}</p>`
}
return content