check keys

This commit is contained in:
barisusakli
2014-09-21 13:30:20 -04:00
parent 0914004e12
commit 5f2a66295c
6 changed files with 184 additions and 26 deletions

View File

@@ -527,6 +527,9 @@ var async = require('async'),
};
Posts.getPostIndices = function(posts, uid, callback) {
if (!Array.isArray(posts) || !posts.length) {
return callback(null, []);
}
user.getSettings(uid, function(err, settings) {
if (err) {
return callback(err);