Skip to content

Node.js based forum software built for the modern web

crash fix

barisusaklifc99864c066a
diff --git a/src/topics/teaser.js b/src/topics/teaser.js
index 4574151554..b02c4a5189 100644
--- a/src/topics/teaser.js
+++ b/src/topics/teaser.js
@@ -61,6 +61,9 @@ module.exports = function(Topics) {
return callback(err);
}
var teasers = topics.map(function(topic, index) {
+ if (!topic) {
+ return null;
+ }
if (tidToPost[topic.tid]) {
tidToPost[topic.tid].index = counts[index];
if (tidToPost[topic.tid].content) {