Skip to content

Node.js based forum software built for the modern web

added back error check

Baris Soner Usakli8506819a7d74
diff --git a/src/topics.js b/src/topics.js
index 3151a70705..7d5d0f7441 100644
--- a/src/topics.js
+++ b/src/topics.js
@@ -907,6 +907,10 @@ var async = require('async'),
Topics.getAllTopics = function(start, end, callback) {
db.getSortedSetRevRange('topics:recent', start, end, function(err, tids) {
+ if(err) {
+ return callback(err);
+ }
+
async.map(tids, function(tid, next) {
Topics.getTopicDataWithUser(tid, next);
}, callback);