Skip to content

Commit 040d77c

Browse files
committed
Narrow down the type to CallExpression
1 parent a5ac70f commit 040d77c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/rules/button-has-type.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ module.exports = {
136136
checkValue(node, propValue);
137137
},
138138
CallExpression(node) {
139+
if (node.type !== 'CallExpression') {
140+
return;
141+
}
139142
if (!isCreateElement(node, context) || node.arguments.length < 1) {
140143
return;
141144
}

0 commit comments

Comments
 (0)