Skip to content

Commit

Permalink
fix: filter non icon types
Browse files Browse the repository at this point in the history
  • Loading branch information
amje committed Dec 20, 2022
1 parent 3c08944 commit b97df9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ function svgoTransformer(svgString) {
}

function createSvgBuilder(metadata) {
return async function svgBuilder([{children: iconSets, components: icons}]) {
return async function svgBuilder([{children, components: icons}]) {
const iconSets = children.filter(({type}) => type === 'COMPONENT_SET');
const iconsById = icons.reduce((acc, item) => ({...acc, [item.id]: item}), {});

for (const iconSet of iconSets) {
Expand Down

0 comments on commit b97df9a

Please sign in to comment.