unplugin / unplugin-icons

🤹 Access thousands of icons as components on-demand universally.
https://www.npmjs.com/package/unplugin-icons
MIT License
3.65k stars 131 forks source link

fix: find collection properly when icon component includes `:` #320

Closed userquin closed 8 months ago

userquin commented 8 months ago

Description

In #316 we included icon with colon (:) handling, but finding the collection logic is wrong, we only need to find the collection by name: the logic in #316 was copy/paste from original handling, where we check first if the icon starts with the prefix + the icon: in the linked issue the problem was that we find the wrong collection.

Linked Issues

check https://github.com/unplugin/unplugin-icons/issues/317#issuecomment-1788027879 (don't close it, it is another problem with string conversion)

Additional context

stackblitz[bot] commented 8 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.