feathericons / feather

Simply beautiful open-source icons
https://feathericons.com
MIT License
24.64k stars 1.21k forks source link

Warn about incorrect icon name and handle gracefully #1241

Closed braden-godley closed 2 months ago

braden-godley commented 2 months ago

Was running into bugs in my company's project which uses Feather. I had added an icon with the incorrect name add somewhere in our codebase, and it was causing feather.replace() to completely break and not replace any icons.

This PR will make it warn if you use the incorrect name and then just simply not try to replace it. This prevents the error from occurring.

Related to #443

image

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: dd208268cdd0a1c4e75e022d2c92679ef92c7822

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------- | ----- | | feather-icons | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

colebemis commented 2 months ago

Thanks for the PR, @braden-godley! Could you add a changeset for this change?

braden-godley commented 2 months ago

will do!

braden-godley commented 2 months ago

Changeset has been added!