Node.js based forum software built for the modern web
fix: dont crash if topic is null
Barış Soner Uşaklıe20ad5c56e80
diff --git a/src/topics/index.js b/src/topics/index.jsindex 30c645f458..6a63680d89 100644--- a/src/topics/index.js+++ b/src/topics/index.js@@ -67,7 +67,7 @@ Topics.getTopicsByTids = async function (tids, options) {const uids = _.uniq(topics.map(t => t && t.uid && t.uid.toString()).filter(v => utils.isNumber(v)));const cids = _.uniq(topics.map(t => t && t.cid && t.cid.toString()).filter(v => utils.isNumber(v)));- const guestTopics = topics.filter(t => t.uid === 0);+ const guestTopics = topics.filter(t => t && t.uid === 0);async function loadGuestHandles() {return await Promise.all(guestTopics.map(topic => posts.getPostField(topic.mainPid, 'handle')));}