Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@neodx/svg Add safe checks to Icon component #122

Open
secundant opened this issue Oct 21, 2023 · 0 comments
Open

@neodx/svg Add safe checks to Icon component #122

secundant opened this issue Oct 21, 2023 · 0 comments
Assignees
Labels
scope:svg Issues related to svg

Comments

@secundant
Copy link
Owner

The Icon component is currently TypeScript-first. If an icon is missing, it throws an Uncaught TypeError: Cannot read properties of undefined (reading 'viewBox').

While this isn't necessarily a problem, I want to provide a simple example that avoids potential unexpected issues, such as when the icon name is sourced from the backend.

@secundant secundant added the scope:svg Issues related to svg label Oct 21, 2023
@secundant secundant self-assigned this Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:svg Issues related to svg
Projects
None yet
Development

No branches or pull requests

1 participant