Skip to content

Node.js based forum software built for the modern web

fix: closes #15023

Barış Soner Uşaklıb609bd3f8865
diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js
index b7e95613fa..815198ebbc 100644
--- a/src/activitypub/notes.js
+++ b/src/activitypub/notes.js
@@ -223,7 +223,9 @@ Notes.assert = async (uid, input, options = { skipChecks: false, queue: false })
// Extract emoji metadata for title rendering
const titleEmoji = [];
- const emojiTags = (_activitypub.tag || []).filter(tag => tag.type === 'Emoji');
+ const emojiTags = Array.isArray(_activitypub.tag) ?
+ _activitypub.tag.filter(tag => tag?.type === 'Emoji') :
+ [];
for (const tag of emojiTags) {
const { name, icon } = tag;
if (!name || !icon?.url) continue;