File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,18 +83,19 @@ export function calculateLogoPlacement(
8383 const icoMatch = options . imageUrl . match (
8484 / ^ d a t a : i m a g e \/ ( x - i c o n | v n d \. m i c r o s o f t \. i c o n ) ; b a s e 6 4 , ( .+ ) $ / i,
8585 ) ;
86+ let imageUrl = options . imageUrl ;
8687 if ( icoMatch ) {
8788 const binary = atob ( icoMatch [ 2 ] ! ) ;
8889 const bytes = new Uint8Array ( binary . length ) ;
8990 for ( let i = 0 ; i < binary . length ; i ++ ) bytes [ i ] = binary . charCodeAt ( i ) ;
90- options = { ... options , imageUrl : icoToPngDataURI ( bytes ) } ;
91+ imageUrl = icoToPngDataURI ( bytes ) ;
9192 }
9293 const imgW = options . imageWidth ?? logoPixelSize ;
9394 const imgH = options . imageHeight ?? logoPixelSize ;
9495 // Center the image within the logo area
9596 const imgX = logoX + ( logoPixelSize - imgW ) / 2 ;
9697 const imgY = logoY + ( logoPixelSize - imgH ) / 2 ;
97- svg += `<image href="${ escapeAttr ( options . imageUrl ) } " x="${ imgX } " y="${ imgY } " width="${ imgW } " height="${ imgH } "/>` ;
98+ svg += `<image href="${ escapeAttr ( imageUrl ) } " x="${ imgX } " y="${ imgY } " width="${ imgW } " height="${ imgH } "/>` ;
9899 }
99100
100101 return { svg, hiddenModules } ;
You can’t perform that action at this time.
0 commit comments