diff --git a/src/routes/api.js b/src/routes/api.js index 68ee19967f..0635188db3 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -47,7 +47,7 @@ var path = require('path'), }); function iterator(category, callback) { - categories.getRecentReplies(category.cid, 2, function (posts) { + categories.getRecentReplies(category.cid, 2, function (err, posts) { category.posts = posts; category.post_count = posts.length > 2 ? 2 : posts.length; callback(null);