react-icons / react-icons

svg react icons of popular icon packs
https://react-icons.github.io/react-icons/
Other
11.25k stars 725 forks source link

[Bug]: Icons from Simple Icons with empty title #889

Closed matheusvellone closed 5 months ago

matheusvellone commented 5 months ago

Describe the bug

Empty tag <title></title> always present in icons from Simple Icons (not sure if there are other packs with same behaviour). Even when setting the title attribute when using the icon, the empty <title>/<title> still exists.

Looks like some "default" children being set on icon

This causes a problem when I set a title on a parent element with the icon as a child, because the icon "steals" the title value and don't display the title from the parent, causing some unexpected behaviors

Expected behavior

Expect the empty <title> tag to not be present inside the <svg> when no title was provided

Minimal sample repository URL

https://codesandbox.io/p/sandbox/peaceful-darkness-tnjj6r

Steps To Reproduce

Run the code and inpect the element from the icons

The SiDatadog ones will have a empty <title></title> inside the <svg> tag despite the title attribute being set or not

Package version

4.12.0

Relevant log output

No response

Additional context

No response