File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ module.exports = {
253
253
}
254
254
255
255
function handleAttribute ( node ) {
256
- if ( ! checkAttributes || node . value . type !== 'JSXExpressionContainer' ) {
256
+ if ( ! checkAttributes || ( ! node . value || node . value . type !== 'JSXExpressionContainer' ) ) {
257
257
return ;
258
258
}
259
259
const nameIndent = getNodeIndent ( node . name ) ;
Original file line number Diff line number Diff line change @@ -820,6 +820,18 @@ const Component = () => (
820
820
);
821
821
` ,
822
822
options : [ 'tab' , { checkAttributes : false } ]
823
+ } , {
824
+ code : `
825
+ function Foo() {
826
+ return (
827
+ <input
828
+ type="radio"
829
+ defaultChecked
830
+ />
831
+ );
832
+ }
833
+ ` ,
834
+ options : [ 2 , { checkAttributes : true } ]
823
835
} ] ,
824
836
825
837
invalid : [ {
You can’t perform that action at this time.
0 commit comments