File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ module.exports = {
306
306
const value = node . value ;
307
307
const regExp = indentType === 'space' ? / \n ( * ) [ \t ] * \S / g : / \n ( \t * ) [ \t ] * \S / g;
308
308
const nodeIndentsPerLine = Array . from (
309
- matchAll ( value , regExp ) ,
309
+ matchAll ( String ( value ) , regExp ) ,
310
310
match => ( match [ 1 ] ? match [ 1 ] . length : 0 )
311
311
) ;
312
312
const hasFirstInLineNode = nodeIndentsPerLine . length > 0 ;
Original file line number Diff line number Diff line change @@ -976,6 +976,19 @@ const Component = () => (
976
976
'</App>'
977
977
] . join ( '\n' ) ,
978
978
options : [ 'tab' ]
979
+ } , {
980
+ code : [
981
+ '<App>' ,
982
+ '\t{undefined}' ,
983
+ '\t{null}' ,
984
+ '\t{true}' ,
985
+ '\t{false}' ,
986
+ '\t{42}' ,
987
+ '\t{NaN}' ,
988
+ '\t{"foo"}' ,
989
+ '</App>'
990
+ ] . join ( '\n' ) ,
991
+ options : [ 'tab' ]
979
992
} ] ,
980
993
981
994
invalid : [ {
You can’t perform that action at this time.
0 commit comments