File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -417,9 +417,11 @@ new function() {
417417 Base . each ( SVGStyles , function ( entry ) {
418418 // Get a given style only if it differs from the value on the parent
419419 // (A layer or group which can have style values in SVG).
420- var value = style [ entry . get ] ( ) ;
421- if ( ! parentStyle || ! Base . equals ( parentStyle [ entry . get ] ( ) , value ) ) {
422- if ( entry . type === 'color' && value != null ) {
420+ var get = entry . get ,
421+ type = entry . type ,
422+ value = style [ get ] ( ) ;
423+ if ( ! parentStyle || ! Base . equals ( parentStyle [ get ] ( ) , value ) ) {
424+ if ( type === 'color' && value != null ) {
423425 // Support for css-style rgba() values is not in SVG 1.1, so
424426 // separate the alpha value of colors with alpha into the
425427 // separate fill- / stroke-opacity attribute:
@@ -429,16 +431,16 @@ new function() {
429431 }
430432 attrs [ entry . attribute ] = value == null
431433 ? 'none'
432- : entry . type === 'number'
434+ : type === 'number'
433435 ? formatter . number ( value )
434- : entry . type === 'color'
436+ : type === 'color'
435437 ? value . gradient
436438 ? exportGradient ( value , item )
437439 // true for noAlpha, see above
438440 : value . toCSS ( true )
439- : entry . type === 'array'
441+ : type === 'array'
440442 ? value . join ( ',' )
441- : entry . type === 'lookup'
443+ : type === 'lookup'
442444 ? entry . toSVG [ value ]
443445 : value ;
444446 }
You can’t perform that action at this time.
0 commit comments