fixing issue with teasers showing deleted post info

This commit is contained in:
Julian Lam
2013-05-21 20:12:13 -04:00
parent 76aa644314
commit fd38b60bd6
2 changed files with 14 additions and 11 deletions

View File

@@ -287,7 +287,11 @@ marked.setOptions({
Topics.get_latest_undeleted_pid = function(tid, callback) {
RDB.lrange('tid:' + tid + ':posts', 0, -1, function(err, pids) {
var pidKeys = [];
var pidKeys = [],
numPids = pids.length;
if (numPids === 0) return callback(null);
for(var x=0,numPids=pids.length;x<numPids;x++) {
pidKeys.push('pid:' + pids[x] + ':deleted');
}