Node.js based forum software built for the modern web
fix: syntax error on undefined value
Julian Lam6b3b3e7ee337
diff --git a/src/activitypub/notes.js b/src/activitypub/notes.jsindex a40ce33ab4..ac5fda2894 100644--- a/src/activitypub/notes.js+++ b/src/activitypub/notes.js@@ -219,7 +219,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {}// Filter image attachments out if they are in content- const { attachment } = post._activitypub;+ const attachment = post?._activitypub?.attachment;if (attachment && attachment.length) {post._activitypub.attachment = attachment.filter((attachment) => {const inContent = attachment.type === 'Image' && (post.sourceContent || post.content).includes(attachment.url);