@@ -23,7 +23,7 @@ const dynamicSvgProps = [
2323 'role' ,
2424 'style' ,
2525 'viewBox' ,
26- 'width'
26+ 'width' ,
2727] ;
2828
2929/**
@@ -46,13 +46,13 @@ function templatizeSvgString(src) {
4646 svg . children = [ ...prepend . children , ...svg . children , ...append . children ] ;
4747
4848 // Identify props already in use in the SVG versus those yet to be used
49- const usedProps = dynamicSvgProps . filter ( prop => Boolean ( svg . attrs [ prop ] ) ) ;
50- const unusedProps = dynamicSvgProps . filter ( prop => ! svg . attrs [ prop ] ) ;
49+ const usedProps = dynamicSvgProps . filter ( ( prop ) => Boolean ( svg . attrs [ prop ] ) ) ;
50+ const unusedProps = dynamicSvgProps . filter ( ( prop ) => ! svg . attrs [ prop ] ) ;
5151
5252 // Properties already in use should have their value set to a conditional.
5353 // The `default` filter would be less code, but things get tricky when it
5454 // comes to managing quotation marks in XML.
55- usedProps . forEach ( prop => {
55+ usedProps . forEach ( ( prop ) => {
5656 const current = svg . attrs [ prop ] ;
5757 // Dashes have meaning in Twig expressions, so we replace them with
5858 // underscores in property names.
@@ -69,7 +69,7 @@ function templatizeSvgString(src) {
6969 // We build a big string of attribute name/value pairs for any properties
7070 // yet to be used for this asset.
7171 const unusedPropHtml = unusedProps
72- . map ( prop => {
72+ . map ( ( prop ) => {
7373 const twigProp = prop . replace ( / - / g, '_' ) ;
7474 return `{% if ${ twigProp } %} ${ prop } ="{{${ twigProp } }}"{% endif %}` ;
7575 } )
0 commit comments