fix: null check for note attachments for thumbs view

This commit is contained in:
Julian Lam
2024-07-19 10:51:41 -04:00
parent 60408f2307
commit 2aa0483718

View File

@@ -59,7 +59,7 @@ Thumbs.get = async function (tids) {
const mainPidAttachments = await posts.attachments.get(mainPids);
mainPidAttachments.forEach((attachments, idx) => {
attachments = attachments.filter(
attachment => attachment.mediaType.startsWith('image/')
attachment => attachment.mediaType && attachment.mediaType.startsWith('image/')
);
if (attachments.length) {