fixed home loading

This commit is contained in:
Baris Usakli
2013-08-08 14:30:42 -04:00
parent e69928d624
commit e979d1bf0d
3 changed files with 13 additions and 5 deletions

View File

@@ -186,6 +186,11 @@ var RDB = require('./redis.js'),
Categories.getRecentReplies = function(cid, count, callback) {
RDB.zrevrange('categories:recent_posts:cid:' + cid, 0, (count<10)?10:count, function(err, pids) {
if(err) {
console.log(err);
callback([]);
return;
}
if (pids.length == 0) {
callback([]);