Skip to content

Commit

Permalink
Fix json file
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcconechy committed Sep 19, 2023
1 parent 32f5a49 commit 8c482e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/node/build-icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function optimizeSVGs(src) {
.replace(/<svg[^>]*>/g, '')
.replace(/<\/svg>/g, '');
pathStatement = pathStatement.replaceAll('#000', 'currentColor');
const hasStroke2 = svgFile.indexOf('stroke="currentColor"') > -1;
const hasStroke2 = pathStatement.indexOf('stroke="currentColor"') > -1;
if (!hasStroke2) pathStatement = pathStatement.replace('d=', 'fill="currentColor" stroke="none" d=');

iconJSON += `"${path.basename(filepath, '.svg')}": "${pathStatement.replace(/"/g, '\\"')}"${mapIndex + 1 === (last) ? '' : ','}\n`;
Expand Down

0 comments on commit 8c482e8

Please sign in to comment.