mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 02:36:16 +01:00
feat: async/await
This commit is contained in:
@@ -38,8 +38,8 @@ module.exports = function (Posts) {
|
||||
]);
|
||||
|
||||
const paths = pids.map(function (pid, index) {
|
||||
var slug = topicData[index] ? topicData[index].slug : null;
|
||||
var postIndex = utils.isNumber(indices[index]) ? parseInt(indices[index], 10) + 1 : null;
|
||||
const slug = topicData[index] ? topicData[index].slug : null;
|
||||
const postIndex = utils.isNumber(indices[index]) ? parseInt(indices[index], 10) + 1 : null;
|
||||
|
||||
if (slug && postIndex) {
|
||||
return '/topic/' + slug + '/' + postIndex;
|
||||
|
||||
Reference in New Issue
Block a user