diff --git a/packages/icons/scripts/buildSvg.js b/packages/icons/scripts/buildSvg.js index 13e3222832..40c5148c19 100644 --- a/packages/icons/scripts/buildSvg.js +++ b/packages/icons/scripts/buildSvg.js @@ -17,7 +17,7 @@ const normalizeAndCopySvg = (srcDir, distDir) => { const svgPath = path.join(srcDir, svg); const svgDistPath = path.join(distDir, svg); const svgContent = fs.readFileSync(svgPath, 'utf8'); - const svgContentFixed = svgContent.replace(/fill="#\w+"/g, 'fill="currentColor"'); + const svgContentFixed = svg.endsWith('-colored.svg') ? svgContent : svgContent.replace(/fill="#\w+"/g, 'fill="currentColor"'); const svgSpriteContent = svgContentFixed .replace(//, ``) .replace(/<\/svg>/g, '');