From 8c482e85e26dd5e7c30511798bdded6cc7da15fb Mon Sep 17 00:00:00 2001 From: Tim McConechy Date: Tue, 19 Sep 2023 13:49:02 -0400 Subject: [PATCH] Fix json file --- scripts/node/build-icons.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/node/build-icons.js b/scripts/node/build-icons.js index 8347d635..88805b98 100644 --- a/scripts/node/build-icons.js +++ b/scripts/node/build-icons.js @@ -154,7 +154,7 @@ function optimizeSVGs(src) { .replace(/]*>/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`;