File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,9 @@ export function styles(
67
67
const [ vopacity , copacity ] = maybeNumberChannel ( opacity ) ;
68
68
69
69
// For styles that have no effect if there is no stroke, only apply the
70
- // defaults if the stroke is not (constant) none.
70
+ // defaults if the stroke is not the constant none. (If stroke is a channel,
71
+ // then cstroke will be undefined, but there’s still a stroke; hence we don’t
72
+ // use the none helper here.)
71
73
if ( cstroke !== "none" ) {
72
74
if ( strokeWidth === undefined ) strokeWidth = defaultStrokeWidth ;
73
75
if ( strokeLinecap === undefined ) strokeLinecap = defaultStrokeLinecap ;
@@ -207,7 +209,7 @@ export function impliedNumber(value, impliedValue) {
207
209
}
208
210
209
211
export function none ( color ) {
210
- return color == null || color === " none" ;
212
+ return color == null || / ^ \s * n o n e \s * $ / i . test ( color ) ;
211
213
}
212
214
213
215
const validClassName = / ^ - ? ( [ _ a - z ] | [ \240- \377] | \\ [ 0 - 9 a - f ] { 1 , 6 } ( \r \n | [ \t \r \n \f ] ) ? | \\ [ ^ \r \n \f 0 - 9 a - f ] ) ( [ _ a - z 0 - 9 - ] | [ \240- \377] | \\ [ 0 - 9 a - f ] { 1 , 6 } ( \r \n | [ \t \r \n \f ] ) ? | \\ [ ^ \r \n \f 0 - 9 a - f ] ) * $ / ;
You can’t perform that action at this time.
0 commit comments