Skip to content

Commit

Permalink
fix: handle duplicate icon entries in include config (#245)
Browse files Browse the repository at this point in the history
* fix: handle duplicate icon entries in include config

* Create eight-sloths-dream.md

---------

Co-authored-by: Nate Moore <[email protected]>
  • Loading branch information
stramel and natemoo-re authored Nov 5, 2024
1 parent 4c5da33 commit ff3a66a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/eight-sloths-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro-icon": patch
---

Fixes handling of duplicate icon entries in the integration configuration
2 changes: 1 addition & 1 deletion packages/core/src/loaders/loadIconifyCollections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default async function loadIconifyCollections({
return acc;
}

const requestedIcons = include[name];
const requestedIcons = Array.from(new Set(include[name]));

// Requested entire icon collection
if (requestedIcons.length === 1 && requestedIcons[0] === "*") {
Expand Down

0 comments on commit ff3a66a

Please sign in to comment.