if group search is executed with empty string, return all groups

This commit is contained in:
Julian Lam
2015-01-21 16:55:03 -05:00
parent 5fe69e0386
commit 2a6de59277
2 changed files with 4 additions and 4 deletions

View File

@@ -878,8 +878,8 @@ var async = require('async'),
};
Groups.search = function(query, options, callback) {
if (!query || !query.length) {
return callback(null, []);
if (!query) {
query = '';
}
async.waterfall([