mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-28 10:19:50 +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);
|
const mainPidAttachments = await posts.attachments.get(mainPids);
|
||||||
mainPidAttachments.forEach((attachments, idx) => {
|
mainPidAttachments.forEach((attachments, idx) => {
|
||||||
attachments = attachments.filter(
|
attachments = attachments.filter(
|
||||||
attachment => attachment.mediaType.startsWith('image/')
|
attachment => attachment.mediaType && attachment.mediaType.startsWith('image/')
|
||||||
);
|
);
|
||||||
|
|
||||||
if (attachments.length) {
|
if (attachments.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user