fix: product hunt today (#6305)
This commit is contained in:
@@ -11,11 +11,11 @@ module.exports = async (ctx) => {
|
||||
title: 'Product Hunt Today Popular',
|
||||
link: 'https://www.producthunt.com/',
|
||||
item: list.map((l) => {
|
||||
const img = `https://ph-files.imgix.net/${data[l.thumbnail.id].image_uuid}?auto=format&auto=compress&codec=mozjpeg&cs=strip&w=150&h=150&fit=crop`;
|
||||
const img = l.thumbnail ? `https://ph-files.imgix.net/${data[l.thumbnail.id].image_uuid}?auto=format&auto=compress&codec=mozjpeg&cs=strip&w=150&h=150&fit=crop` : '';
|
||||
|
||||
return {
|
||||
title: l.name,
|
||||
description: `${l.tagline}<br><img src="${img}">`,
|
||||
description: `${l.tagline}<br>${img === '' ? '' : `<img src="${img}">`}`,
|
||||
link: 'https://www.producthunt.com/posts/' + l.slug,
|
||||
pubDate: new Date(l.updated_at),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user