|
|
@ -206,9 +206,10 @@ async function addTags(topicData, req, res) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
description = description.replace(/\n/g, ' ');
|
|
|
|
description = description.replace(/\n/g, ' ');
|
|
|
|
|
|
|
|
|
|
|
|
const mainPost = postIndex === 0 && postAtIndex ?
|
|
|
|
let mainPost = topicData.posts.find(p => parseInt(p.index, 10) === 0);
|
|
|
|
postAtIndex :
|
|
|
|
if (!mainPost) {
|
|
|
|
await topics.getMainPost(topicData.tid, req.uid);
|
|
|
|
mainPost = await posts.getPostData(topicData.mainPid);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
res.locals.metaTags = [
|
|
|
|
res.locals.metaTags = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|