mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-11 23:20:46 +01:00
fixed issue with getUsersData not actually returning the same number of elements as was passed-in
This commit is contained in:
@@ -81,15 +81,15 @@ module.exports = function (User) {
|
||||
}
|
||||
|
||||
// Eliminate duplicates and build ref table
|
||||
uids = uids.filter(function (uid, index) {
|
||||
var uniqueUids = uids.filter(function (uid, index) {
|
||||
return index === uids.indexOf(uid);
|
||||
});
|
||||
var ref = uids.reduce(function (memo, cur, idx) {
|
||||
var ref = uniqueUids.reduce(function (memo, cur, idx) {
|
||||
memo[cur] = idx;
|
||||
return memo;
|
||||
}, {});
|
||||
|
||||
var keys = uids.map(function (uid) {
|
||||
var keys = uniqueUids.map(function (uid) {
|
||||
return 'user:' + uid;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user