Skip to content

Node.js based forum software built for the modern web

fixed conditional in posts.js

Baris Usakli652fda1a6f05
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);