Skip to content

Commit 12ccd6a

Browse files
stevematneydiasbruno
andcommittedNov 10, 2021
[fixed] using concat for finding shadowRoot descendants instead of spread
Co-authored-by: Bruno Dias <dias.h.bruno@gmail.com>
1 parent f5783ca commit 12ccd6a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
 

‎src/helpers/tabbable.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,9 @@ export default function findTabbableDescendants(element) {
6868
const descendants = [].slice
6969
.call(element.querySelectorAll("*"), 0)
7070
.reduce(
71-
(finished, el) => [
72-
...finished,
73-
...(!el.shadowRoot ? [el] : findTabbableDescendants(el.shadowRoot))
74-
],
71+
(finished, el) => finished.concat(
72+
!el.shadowRoot ? [el] : findTabbableDescendants(el.shadowRoot)
73+
),
7574
[]
7675
);
7776
return descendants.filter(tabbable);

0 commit comments

Comments
 (0)
Please sign in to comment.