Skip to content

Commit

Permalink
chore: escape chars in icon fetching script
Browse files Browse the repository at this point in the history
Parenthesis chars are being used and they need to be escaped
  • Loading branch information
DSil committed May 22, 2024
1 parent 0507a2a commit 217f858
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/orbit-components/config/fetchIcons.mts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,10 @@ async function saveOrbitIcons(data: { name: string; svg: string; id: string }[])
const nodeId = nodes[id] as string;
return {
id,
name: nodeId.toLowerCase().replace(/\+kg/, "").replace(/\s+/g, "-"),
name: nodeId
.toLowerCase()
.replace(/\+kg|\(|\)/g, "")
.replace(/\s+/g, "-"),
svg: await res.text(),
};
}),
Expand Down

0 comments on commit 217f858

Please sign in to comment.