Handle an undefined publisher_summary when querying Audible

This commit is contained in:
Selfhost Alt 2022-04-16 14:57:36 -07:00
parent cdcfd01da2
commit 2fc60e4e9c

View File

@ -17,7 +17,7 @@ class Audible {
narrator: narrators ? narrators.map(({ name }) => name).join(', ') : null,
publisher: publisher_name,
publishedYear: release_date ? release_date.split('-')[0] : null,
description: stripHtml(publisher_summary).result,
description: publisher_summary ? stripHtml(publisher_summary).result : null,
cover: this.getBestImageLink(product_images),
asin,
series: primarySeries ? primarySeries.title : null,