mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 06:25:50 +01:00
fix teasers
This commit is contained in:
@@ -394,14 +394,16 @@ var async = require('async'),
|
||||
users[user.uid] = user;
|
||||
});
|
||||
var tidToPost = {};
|
||||
postData.forEach(function(post, index) {
|
||||
postData.forEach(function(post) {
|
||||
post.user = users[post.uid];
|
||||
post.index = results.counts[index] + 1;
|
||||
post.timestamp = utils.toISOString(post.timestamp);
|
||||
tidToPost[post.tid] = post;
|
||||
});
|
||||
|
||||
var teasers = tids.map(function(tid) {
|
||||
var teasers = tids.map(function(tid, index) {
|
||||
if (tidToPost[tid]) {
|
||||
tidToPost[tid].index = results.counts[index] + 1;
|
||||
}
|
||||
return tidToPost[tid];
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user