File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ module.exports = {
40
40
. invert ( )
41
41
. value ( ) ;
42
42
const invertedColorsDict = _ . assign ( { } , validColorsDic , extraColors ) ;
43
- const lowerCaseColorString = colorString . toLowerCase ( ) . replace ( / / g, '' ) ;
43
+ const lowerCaseColorString = ( colorString ? colorString . toLowerCase ( ) : '' ) . replace ( / / g, '' ) ;
44
44
if ( invertedColorsDict [ lowerCaseColorString ] ) {
45
45
return fixer . replaceText ( node , `Colors.${ invertedColorsDict [ lowerCaseColorString ] } ` ) ;
46
46
}
@@ -78,7 +78,7 @@ module.exports = {
78
78
79
79
const colorExceptions = [ 'transparent' ] ;
80
80
81
- function isColorException ( colorString ) {
81
+ function isColorException ( colorString = '' ) {
82
82
const lowerCaseColorString = colorString . toLowerCase ( ) ;
83
83
return colorExceptions . indexOf ( lowerCaseColorString ) !== - 1 ;
84
84
}
You can’t perform that action at this time.
0 commit comments