fixed issue with getUsersData not actually returning the same number of elements as was passed-in

v1.18.x
Julian Lam 8 years ago
parent 888c120e08
commit 709a7ff7f0

@ -81,15 +81,15 @@ module.exports = function (User) {
} }
// Eliminate duplicates and build ref table // Eliminate duplicates and build ref table
uids = uids.filter(function (uid, index) { var uniqueUids = uids.filter(function (uid, index) {
return index === uids.indexOf(uid); return index === uids.indexOf(uid);
}); });
var ref = uids.reduce(function (memo, cur, idx) { var ref = uniqueUids.reduce(function (memo, cur, idx) {
memo[cur] = idx; memo[cur] = idx;
return memo; return memo;
}, {}); }, {});
var keys = uids.map(function (uid) { var keys = uniqueUids.map(function (uid) {
return 'user:' + uid; return 'user:' + uid;
}); });

Loading…
Cancel
Save