From e69f40594514a2b0c6f4351d33a372b0377cccab Mon Sep 17 00:00:00 2001 From: Crevil Date: Mon, 1 Aug 2022 17:40:19 +0200 Subject: [PATCH] Simplify code to be more readable Signed-off-by: Crevil --- .../src/reader/transformers/scrollIntoNavigation.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/techdocs/src/reader/transformers/scrollIntoNavigation.ts b/plugins/techdocs/src/reader/transformers/scrollIntoNavigation.ts index 1e17d08835..e8d6161404 100644 --- a/plugins/techdocs/src/reader/transformers/scrollIntoNavigation.ts +++ b/plugins/techdocs/src/reader/transformers/scrollIntoNavigation.ts @@ -23,9 +23,9 @@ export const scrollIntoNavigation = (): Transformer => { if (activeNavItems.length !== 0) { // expand all navigation items that are active activeNavItems.forEach(activeNavItem => { - const input = activeNavItem?.querySelector('input'); - if (input && !input?.checked) { - input.click(); + const checkbox = activeNavItem?.querySelector('input'); + if (!checkbox?.checked) { + checkbox?.click(); } });