diff --git a/lib/routes/hk01/channel.js b/lib/routes/hk01/channel.js index 253e10c2d..af455d42b 100644 --- a/lib/routes/hk01/channel.js +++ b/lib/routes/hk01/channel.js @@ -13,7 +13,7 @@ module.exports = async (ctx) => { link: data.category.publishUrl, item: list.map((item) => ({ title: item.data.title, - author: item.data.authors.map((e) => e.publishName).join(', '), + author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '), description: `

${item.data.description}…

`, pubDate: new Date(item.data.lastModifyTime * 1000), link: item.data.canonicalUrl, diff --git a/lib/routes/hk01/hot.js b/lib/routes/hk01/hot.js index 944966771..b991a7ff0 100644 --- a/lib/routes/hk01/hot.js +++ b/lib/routes/hk01/hot.js @@ -11,7 +11,7 @@ module.exports = async (ctx) => { link: data.meta.canonicalUrl, item: list.map((item) => ({ title: item.data.title, - author: item.data.authors.map((e) => e.publishName).join(', '), + author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '), description: `

${item.data.description}

`, pubDate: new Date(item.data.lastModifyTime * 1000), link: item.data.canonicalUrl, diff --git a/lib/routes/hk01/issue.js b/lib/routes/hk01/issue.js index 1f079faf3..8a4eb3027 100644 --- a/lib/routes/hk01/issue.js +++ b/lib/routes/hk01/issue.js @@ -13,7 +13,7 @@ module.exports = async (ctx) => { link: data.issue.publishUrl, item: list.map((item) => ({ title: item.data.title, - author: item.data.authors.map((e) => e.publishName).join(', '), + author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '), description: `

${item.data.description}…

`, pubDate: new Date(item.data.lastModifyTime * 1000), link: item.data.canonicalUrl, diff --git a/lib/routes/hk01/tag.js b/lib/routes/hk01/tag.js index 54691c952..46186f9d8 100644 --- a/lib/routes/hk01/tag.js +++ b/lib/routes/hk01/tag.js @@ -13,7 +13,7 @@ module.exports = async (ctx) => { link: data.tag.publishUrl, item: list.map((item) => ({ title: item.data.title, - author: item.data.authors.map((e) => e.publishName).join(', '), + author: item.data.authors && item.data.authors.map((e) => e.publishName).join(', '), description: `

${item.data.description}

`, pubDate: new Date(item.data.lastModifyTime * 1000), link: item.data.canonicalUrl, diff --git a/lib/routes/hk01/zone.js b/lib/routes/hk01/zone.js index 3131d8584..e39c16563 100644 --- a/lib/routes/hk01/zone.js +++ b/lib/routes/hk01/zone.js @@ -17,7 +17,7 @@ module.exports = async (ctx) => { let pubDate; switch (item.type) { case 1: - author = item.data.authors.map((e) => e.publishName).join(', '); + author = item.data.authors && item.data.authors.map((e) => e.publishName).join(', '); description = `

${item.data.description}

`; pubDate = new Date(item.data.lastModifyTime * 1000); break;