fix: closes #12787, filter null topics

This commit is contained in:
Barış Soner Uşaklı
2024-09-11 14:26:16 -04:00
parent 5109b53921
commit c2600b124f

View File

@@ -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 &&