Skip to content

Commit eb35a44

Browse files
committed
PLANET-8026 Review Update
- Refactored selector to use spread operator instead of Array.from
1 parent 80bbb6c commit eb35a44

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

assets/src/js/header/setupAccessibleNavMenu.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ export const setupAccessibleNavMenu = () => {
134134
const focusableSelectors =
135135
'a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])';
136136

137-
const focusableElements = Array.from(
138-
mobileNav.querySelectorAll(focusableSelectors)
139-
);
137+
const focusableElements = [...mobileNav.querySelectorAll(focusableSelectors)];
140138

141139
if (!focusableElements.length) {
142140
return;

0 commit comments

Comments
 (0)