Simplify code to be more readable

Signed-off-by: Crevil <bjoern.soerensen@gmail.com>
This commit is contained in:
Crevil
2022-08-01 17:40:19 +02:00
parent 1abe0a2333
commit e69f405945
@@ -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();
}
});