mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 06:25:50 +01:00
fix upgrade script to include main post, and fix post indices
This commit is contained in:
@@ -357,7 +357,7 @@ var async = require('async'),
|
||||
return next(err);
|
||||
}
|
||||
topics = topics.map(function(topic) {
|
||||
return topic && topic.postcount;
|
||||
return topic && (parseInt(topic.postcount, 10) || 0);
|
||||
});
|
||||
|
||||
next(null, topics);
|
||||
@@ -409,7 +409,7 @@ var async = require('async'),
|
||||
|
||||
var teasers = tids.map(function(tid, index) {
|
||||
if (tidToPost[tid]) {
|
||||
tidToPost[tid].index = results.counts[index] + 1;
|
||||
tidToPost[tid].index = results.counts[index];
|
||||
}
|
||||
return tidToPost[tid];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user