Merge remote-tracking branch 'origin/0.5.1' into topic_searching

This commit is contained in:
Julian Lam
2014-08-27 15:04:43 -04:00
2 changed files with 5 additions and 1 deletions

View File

@@ -367,4 +367,8 @@ SocketPosts.getCategory = function(socket, pid, callback) {
posts.getCidByPid(pid, callback);
};
SocketPosts.getPidIndex = function(socket, pid, callback) {
posts.getPidIndex(pid, socket.uid, callback);
};
module.exports = SocketPosts;

View File

@@ -254,7 +254,7 @@ var async = require('async'),
}
notifications = notifications.filter(function(notification) {
return !!notification || notification[field] !== value.toString();
return notification && notification[field] !== value.toString();
}).map(function(notification) {
return notification.nid;
});