mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: closes #12787, filter null topics
This commit is contained in:
@@ -24,7 +24,7 @@ Thumbs.exists = async function (id, path) {
|
||||
};
|
||||
|
||||
Thumbs.load = async function (topicData) {
|
||||
const mainPids = topicData.map(t => t.mainPid);
|
||||
const mainPids = topicData.filter(Boolean).map(t => t.mainPid);
|
||||
let hashes = await posts.getPostsFields(mainPids, ['attachments']);
|
||||
hashes = hashes.map(o => o.attachments);
|
||||
const topicsWithThumbs = topicData.filter((t, idx) => t &&
|
||||
|
||||
Reference in New Issue
Block a user