From 652fda1a6f0536203c9002fb372c9dbda8dff4e2 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Fri, 29 Nov 2013 13:12:50 -0500 Subject: [PATCH] fixed conditional in posts.js --- src/posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posts.js b/src/posts.js index 3cbf41d192..535e17f01b 100644 --- a/src/posts.js +++ b/src/posts.js @@ -187,7 +187,7 @@ var RDB = require('./redis'), if (pids.length) { plugins.fireHook('filter:post.getTopic', pids, function(err, posts) { - if (!err & 0 < posts.length) { + if (!err && posts.length > 0) { Posts.getPostsByPids(pids, function(err, posts) { plugins.fireHook('action:post.gotTopic', posts); callback(posts);