Skip to content

Commit 2c47f0a

Browse files
committed
[Fix] autocomplete-valid: workaround for axe not being able to handle null
1 parent 00bd6d8 commit 2c47f0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rules/autocomplete-valid.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ module.exports = {
3535
return;
3636
}
3737

38+
const type = getLiteralPropValue(getProp(node.attributes, 'type'));
3839
const { violations } = runVirtualRule('autocomplete-valid', {
3940
nodeName: 'input',
4041
attributes: {
4142
autocomplete,
4243
// Which autocomplete is valid depends on the input type
43-
type: getLiteralPropValue(getProp(node.attributes, 'type')),
44+
type: type === null ? undefined : type,
4445
},
4546
});
4647

0 commit comments

Comments
 (0)