mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 11:17:29 +02:00
fix: syntax error on undefined value
This commit is contained in:
@@ -219,7 +219,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Filter image attachments out if they are in content
|
// Filter image attachments out if they are in content
|
||||||
const { attachment } = post._activitypub;
|
const attachment = post?._activitypub?.attachment;
|
||||||
if (attachment && attachment.length) {
|
if (attachment && attachment.length) {
|
||||||
post._activitypub.attachment = attachment.filter((attachment) => {
|
post._activitypub.attachment = attachment.filter((attachment) => {
|
||||||
const inContent = attachment.type === 'Image' && (post.sourceContent || post.content).includes(attachment.url);
|
const inContent = attachment.type === 'Image' && (post.sourceContent || post.content).includes(attachment.url);
|
||||||
|
|||||||
Reference in New Issue
Block a user