Skip to content

Node.js based forum software built for the modern web

fix: issue with topic actors not returning proper json

Julian Lam609035b5879b
diff --git a/src/controllers/activitypub/actors.js b/src/controllers/activitypub/actors.js
index beaf346e1b..d98a5bdd93 100644
--- a/src/controllers/activitypub/actors.js
+++ b/src/controllers/activitypub/actors.js
@@ -116,7 +116,7 @@ Actors.topic = async function (req, res, next) {
pids.push(mainPid);
pids = pids.map(pid => (utils.isNumber(pid) ? `${nconf.get('url')}/post/${pid}` : pid));
const digest = activitypub.helpers.generateDigest(new Set(pids));
- const ifNoneMatch = req.get('If-None-Match').split(',').map((tag) => {
+ const ifNoneMatch = (req.get('If-None-Match') || '').split(',').map((tag) => {
tag = tag.trim();
if (tag.startsWith('"') && tag.endsWith('"')) {
return tag.slice(1, tag.length - 1);