fix: callbacks

This commit is contained in:
Baris Usakli
2019-03-15 16:06:38 -04:00
parent f8fa659642
commit b48b6d75e5
2 changed files with 6 additions and 6 deletions

View File

@@ -162,8 +162,8 @@ module.exports = function (Groups) {
Groups.isMembers = function (uids, groupName, callback) {
var cachedData = {};
function getFromCache() {
setImmediate(callback, null, uids.map(uid => cachedData[uid + ':' + groupName]));
function getFromCache(next) {
setImmediate(next, null, uids.map(uid => cachedData[uid + ':' + groupName]));
}
if (!groupName || !uids.length) {
return setImmediate(callback, null, uids.map(() => false));