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

When adding a class from the additional attributes parameter, if the class is null, a null reference exception is thrown. #12

Closed
kevinbourassahoule opened this issue Dec 8, 2021 · 1 comment

Comments

@kevinbourassahoule
Copy link

Probably changing the following line from

https://github.com/EdCharbeneau/CssBuilder/blob/0a491e3e7f2fc680e5b9c7167d2e54de572fcb84/BlazorComponentUtilities/CssBuilder.cs#L120

to

 additionalAttributes.TryGetValue("class", out var c) && c != null ? AddClass(c.ToString()) : this; 

would do the trick?

@EdCharbeneau
Copy link
Owner

Looks like I need some test coverage to find out. 😄

Thanks for submitting this, I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants