From 61483c94f001e453fbf6c3031ab34c90d7901f3e Mon Sep 17 00:00:00 2001 From: Vinay Keerthi <11478411+stonecharioteer@users.noreply.github.com> Date: Mon, 12 Jan 2026 16:38:58 +0530 Subject: [PATCH] fix: use cached headingText variable for consistency Reuse the previously cached headingText variable instead of accessing element.innerText again to avoid unnecessary DOM access. --- app/javascript/portal/portalHelpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/portal/portalHelpers.js b/app/javascript/portal/portalHelpers.js index f183a89fc..18a54c58e 100644 --- a/app/javascript/portal/portalHelpers.js +++ b/app/javascript/portal/portalHelpers.js @@ -29,7 +29,7 @@ export const getHeadingsfromTheArticle = () => { rows.push({ slug, - title: element.innerText, + title: headingText, tag: element.tagName.toLowerCase(), }); });