Skip to content

Node.js based forum software built for the modern web

check topic cid

barisusakli998ed24589b8
diff --git a/src/topics/unread.js b/src/topics/unread.js
index 846e1b34d9..10dd9e53ab 100644
--- a/src/topics/unread.js
+++ b/src/topics/unread.js
@@ -141,7 +141,7 @@ module.exports = function(Topics) {
}
topics = topics.filter(function(topic) {
- return readableCids.indexOf(topic.cid.toString()) !== -1;
+ return topic.cid && readableCids.indexOf(topic.cid.toString()) !== -1;
}).map(function(topic) {
return topic.tid;
});