mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +01:00
if group search is executed with empty string, return all groups
This commit is contained in:
@@ -127,11 +127,11 @@ SocketGroups.delete = function(socket, data, callback) {
|
||||
};
|
||||
|
||||
SocketGroups.search = function(socket, data, callback) {
|
||||
if (!data || !data.query) {
|
||||
if (!data) {
|
||||
return callback(null, []);
|
||||
}
|
||||
|
||||
groups.search(data.query, data.options || {}, callback);
|
||||
groups.search(data.query || '', data.options || {}, callback);
|
||||
};
|
||||
|
||||
SocketGroups.cover = {};
|
||||
|
||||
Reference in New Issue
Block a user