mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 23:52:58 +01:00
fix: null check for note attachments for thumbs view
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user