Skip to content

Commit cc4ce85

Browse files
authored
Live page SEO optional chaining (#12513)
* Live page SEO optional chaining * One more to help me sleep at night
1 parent 51131b8 commit cc4ce85

File tree

1 file changed

+2
-1
lines changed
  • src/app/lib/seoUtils/getLiveBlogPostingSchema

1 file changed

+2
-1
lines changed

src/app/lib/seoUtils/getLiveBlogPostingSchema/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export default ({
4545
'@type': 'BlogPosting',
4646
headline:
4747
// @ts-expect-error - deeply nested
48-
headlineBlock?.model.blocks[0].model.blocks[0].model.text ?? null,
48+
headlineBlock?.model.blocks?.[0]?.model.blocks?.[0]?.model.text ??
49+
null,
4950
publisher: {
5051
'@type': 'Organization',
5152
name: brandName,

0 commit comments

Comments
 (0)