Skip to content

Commit 99c3cdd

Browse files
committed
Default to Map for attributes, not an array
1 parent cff81b5 commit 99c3cdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/isInteractiveElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const pureInteractiveRoleElements = [...elementRoles.entries()]
3737
): ElementCallbackMap => {
3838
const interactiveElements = accumulator;
3939
const elementName = elementSchema.name;
40-
const elementAttributes = elementSchema.attributes || [];
40+
const elementAttributes = elementSchema.attributes || new Map([]);
4141
interactiveElements[elementName] = (attributes: Array<Node>): boolean => {
4242
const passedAttrCheck =
4343
elementAttributes.size === 0 ||

0 commit comments

Comments
 (0)