Skip to content

Commit 26f0587

Browse files
authored
Allow select as a valid child of label.
1 parent 712ec68 commit 26f0587

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rules/label-has-for.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function validateNesting(node) {
3434
while (queue.length) {
3535
child = queue.shift();
3636
opener = child.openingElement;
37-
if (child.type === 'JSXElement' && opener && (opener.name.name === 'input' || opener.name.name === 'textarea')) {
37+
if (child.type === 'JSXElement' && opener && (opener.name.name === 'input' || opener.name.name === 'textarea' || opener.name.name === 'select')) {
3838
return true;
3939
}
4040
if (child.children) {

0 commit comments

Comments
 (0)