Merge pull request #1664 from char101/patch-6

Fix callback execution in redis search
This commit is contained in:
Barış Soner Uşaklı
2014-06-10 11:57:44 -04:00

View File

@@ -27,13 +27,9 @@ module.exports = function(redisClient, module) {
module.searchRemove = function(key, id, callback) {
if(key === 'post') {
module.postSearch.remove(id);
module.postSearch.remove(id, callback);
} else if(key === 'topic') {
module.topicSearch.remove(id);
}
if (typeof callback === 'function') {
callback();
module.topicSearch.remove(id, callback);
}
};