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

Different behavior for keys with undefined properties in style objects using preact/compat #3861

Closed
jpnelson opened this issue Jan 13, 2023 · 0 comments · Fixed by #3862
Closed

Comments

@jpnelson
Copy link

jpnelson commented Jan 13, 2023

It seems as though there's an issue with how Preact handles style props when values are explicitly undefined. It seems to be a little more nuanced than it just leaving undefined in though – I think it happens only when the object property was previously defined, and later becomes undefined:

To Reproduce

Expected behavior

I would expect the --x css property to actually be deleted when it becomes undefined, as this is what happens on initial render.

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

Successfully merging a pull request may close this issue.

1 participant