Skip to content

Commit 9097301

Browse files
committed
fix(ui-scripts): fix getGlyphData to ignore system-generated files in the icons folder
1 parent b617fe3 commit 9097301

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/ui-scripts/lib/icons/get-glyph-data.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ export default function getGlyphData(
3939
const glyphs = []
4040
// variants are in different sub directories
4141
const subdirs = fs.readdirSync(svgSourceDir)
42+
// we only care about subdirs named "Solid" or "Line"
43+
const relevantSubdirs = subdirs.filter(
44+
(dir) => dir === 'Solid' || dir === 'Line'
45+
)
4246

43-
subdirs.forEach((subdir) => {
47+
relevantSubdirs.forEach((subdir) => {
4448
const fileNames = fs.readdirSync(svgSourceDir + subdir)
4549
fileNames.forEach((fileName) => {
4650
const { name, ext } = path.parse(fileName)

0 commit comments

Comments
 (0)