diff --git a/plugins/techdocs/src/reader/transformers/addGitFeedbackLink.ts b/plugins/techdocs/src/reader/transformers/addGitFeedbackLink.ts index 13befb3309..9c7865936c 100644 --- a/plugins/techdocs/src/reader/transformers/addGitFeedbackLink.ts +++ b/plugins/techdocs/src/reader/transformers/addGitFeedbackLink.ts @@ -48,8 +48,9 @@ export const addGitFeedbackLink = ( } // topmost h1 only contains title for whole page - const title = (dom.querySelector('article>h1') as HTMLElement).childNodes[0] - .textContent; + const title = + (dom.querySelector('article>h1') as HTMLElement)?.childNodes[0] + .textContent || ''; const issueTitle = encodeURIComponent(`Documentation Feedback: ${title}`); const issueDesc = encodeURIComponent( `Page source:\n${sourceAnchor.href}\n\nFeedback:`,