fixed conditional in posts.js

v1.18.x
Baris Usakli 11 years ago
parent 6ca3d0c4af
commit 652fda1a6f

@ -187,7 +187,7 @@ var RDB = require('./redis'),
if (pids.length) { if (pids.length) {
plugins.fireHook('filter:post.getTopic', pids, function(err, posts) { 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) { Posts.getPostsByPids(pids, function(err, posts) {
plugins.fireHook('action:post.gotTopic', posts); plugins.fireHook('action:post.gotTopic', posts);
callback(posts); callback(posts);

Loading…
Cancel
Save