From 65364bfa0f62fa589e4dc1d8ded1bf966b8fd510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 24 Jul 2025 23:54:38 -0400 Subject: [PATCH] fix: sometimes summary is null/undefined fixes TypeError: Cannot read properties of null (reading 'replace') at /home/saas/nodebb/src/activitypub/mocks.js:202:24 --- src/activitypub/mocks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activitypub/mocks.js b/src/activitypub/mocks.js index f9995b3b72..5268dd1c01 100644 --- a/src/activitypub/mocks.js +++ b/src/activitypub/mocks.js @@ -191,7 +191,7 @@ Mocks.profile = async (actors) => { const iconBackgrounds = await user.getIconBackgrounds(); let bgColor = Array.prototype.reduce.call(preferredUsername, (cur, next) => cur + next.charCodeAt(), 0); bgColor = iconBackgrounds[bgColor % iconBackgrounds.length]; - + summary = summary || ''; // Replace emoji in summary if (tag && Array.isArray(tag)) { tag