mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
chore: eslint prefer-arrow-callback
This commit is contained in:
committed by
Julian Lam
parent
707b55b6a5
commit
b56d9e12b5
@@ -112,7 +112,7 @@ Topics.getTopicsByTids = async function (tids, options) {
|
||||
]);
|
||||
|
||||
const sortOldToNew = callerSettings.topicPostSort === 'newest_to_oldest';
|
||||
result.topics.forEach(function (topic, i) {
|
||||
result.topics.forEach((topic, i) => {
|
||||
if (topic) {
|
||||
topic.thumbs = result.thumbs[i];
|
||||
topic.category = result.categoriesMap[topic.cid];
|
||||
@@ -280,7 +280,7 @@ Topics.getMainPosts = async function (tids, uid) {
|
||||
|
||||
async function getMainPosts(mainPids, uid) {
|
||||
const postData = await posts.getPostsByPids(mainPids, uid);
|
||||
postData.forEach(function (post) {
|
||||
postData.forEach((post) => {
|
||||
if (post) {
|
||||
post.index = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user