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 = {
253253 }
254254
255255 function handleAttribute ( node ) {
256- if ( ! checkAttributes || node . value . type !== 'JSXExpressionContainer' ) {
256+ if ( ! checkAttributes || ( ! node . value || node . value . type !== 'JSXExpressionContainer' ) ) {
257257 return ;
258258 }
259259 const nameIndent = getNodeIndent ( node . name ) ;
Original file line number Diff line number Diff line change @@ -820,6 +820,18 @@ const Component = () => (
820820);
821821 ` ,
822822 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 } ]
823835 } ] ,
824836
825837 invalid : [ {
You can’t perform that action at this time.
0 commit comments