Skip to content

Commit b692d04

Browse files
committed
Responding to code review
1 parent 4a79503 commit b692d04

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/util/isInteractiveElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const isInteractiveElement = (
164164
): boolean => {
165165
// Do not test higher level JSX components, as we do not know what
166166
// low-level DOM element this maps to.
167-
if ([...dom.keys()].indexOf(tagName) === -1) {
167+
if (!dom.keys(tagName)) {
168168
return false;
169169
}
170170

src/util/isNonInteractiveElement.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const nonInteractiveElementRoles = [...elementRoles.entries()]
4343
roleSet,
4444
],
4545
) => {
46-
if ([...roleSet.keys()].every(
46+
if ([...roleSet].every(
4747
(role): boolean => nonInteractiveRoles.has(role),
4848
)) {
4949
accumulator.set(elementSchema, roleSet);
@@ -161,7 +161,7 @@ const isNonInteractiveElement = (
161161
): boolean => {
162162
// Do not test higher level JSX components, as we do not know what
163163
// low-level DOM element this maps to.
164-
if ([...dom.keys()].indexOf(tagName) === -1) {
164+
if (!dom.has(tagName)) {
165165
return false;
166166
}
167167

0 commit comments

Comments
 (0)