fix(route/apnews): Tackle occasionally missing keywords in ld-json. (#16096)
This commit is contained in:
parent
0126dbc153
commit
b12f3fb21d
|
|
@ -25,7 +25,7 @@ export function fetchArticle(item) {
|
|||
pubDate: parseDate(ldjson.datePublished),
|
||||
updated: parseDate(ldjson.dateModified),
|
||||
description: $('div.RichTextStoryBody').html(),
|
||||
category: [`section:${$("meta[property='article:section']").attr('content')}`, ...ldjson.keywords],
|
||||
category: [`section:${$("meta[property='article:section']").attr('content')}`, ...(ldjson.keywords ?? [])],
|
||||
guid: $("meta[name='brightspot.contentId']").attr('content'),
|
||||
author: ldjson.author,
|
||||
...item,
|
||||
|
|
|
|||
Loading…
Reference in New Issue