fix: natgeo null author (#3548)
This commit is contained in:
parent
aeb111cfe0
commit
57d0860fd9
|
|
@ -12,7 +12,7 @@ module.exports = async (ctx) => {
|
|||
const out = items.slice(0, 10).map((item) => {
|
||||
const info = {
|
||||
title: item.image.title,
|
||||
author: item.image.credit.replace('Photograph by ', ''),
|
||||
author: item.image.credit && item.image.credit.replace('Photograph by ', ''),
|
||||
link: item.pageUrl,
|
||||
description: `<img src="${item.image.uri}">` + item.image.caption,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue