Skip to content

Commit d123ff7

Browse files
committed
Replacing all instances (2) of dom Map key spreading; using has method instead
1 parent b692d04 commit d123ff7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/rules/scope.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = {
3333

3434
// Do not test higher level JSX components, as we do not know what
3535
// low-level DOM element this maps to.
36-
if ([...dom.keys()].indexOf(tagName) === -1) {
36+
if (!dom.has(tagName)) {
3737
return;
3838
} else if (tagName && tagName.toUpperCase() === 'TH') {
3939
return;

src/util/isNonInteractiveRole.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const isNonInteractiveRole = (
4040
): boolean => {
4141
// Do not test higher level JSX components, as we do not know what
4242
// low-level DOM element this maps to.
43-
if ([...dom.keys()].indexOf(tagName) === -1) {
43+
if (!dom.has(tagName)) {
4444
return false;
4545
}
4646

0 commit comments

Comments
 (0)