crash fix

This commit is contained in:
Barış Soner Uşaklı
2015-05-29 00:47:37 -04:00
parent 1b88a6a523
commit 58b8c32fe9

View File

@@ -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) {
@@ -109,4 +112,4 @@ module.exports = function(Topics) {
Topics.setTopicField(tid, 'teaserPid', pid, callback);
});
};
};
};