From f2ce8a96d97df0b4115baa04b3ccfd957e4f3b5c Mon Sep 17 00:00:00 2001 From: Preston Petrie Date: Thu, 21 Aug 2025 11:58:26 -0500 Subject: [PATCH] fix: use `textContent` to get header titles The modern template currently uses `innerText` to get the text from h2 and h3 tags for the "In This Article" section of the affix. However, this can cause links with empty text content to be generated for headers which are not visible at the moment the navigation is generated, such as those in a `
` element. Using `textContent` instead will still properly retrieve the text from these headers. --- templates/modern/src/nav.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/modern/src/nav.ts b/templates/modern/src/nav.ts index 7ff75dcce26..1d55e89800c 100644 --- a/templates/modern/src/nav.ts +++ b/templates/modern/src/nav.ts @@ -127,8 +127,8 @@ function inThisArticle(): TemplateResult { return html`
${loc('inThisArticle')}
` } }