diff options
Diffstat (limited to 'lib/bucky.js')
| -rw-r--r-- | lib/bucky.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bucky.js b/lib/bucky.js index bfc4b6f..70910ef 100644 --- a/lib/bucky.js +++ b/lib/bucky.js @@ -21,7 +21,9 @@ var bucky = module.exports = { lookup[c.thread] = c }) res.threads.forEach(function(thread){ - thread.set("comment_count", lookup[thread.id].count) + if (lookup[thread.id]) { + thread.set("comment_count", lookup[thread.id].count) + } }) next() }) @@ -58,7 +60,7 @@ var bucky = module.exports = { }) }, ensureHootbox: function (req, res, next){ - db.getCommentsForThread(1, 9, 0, "desc").then(function(hootbox){ + db.getCommentsForThread(1, 15, 0, "desc").then(function(hootbox){ res.hootbox = hootbox next() }) |
