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

Fixes #40: Interpolated zero values are taken as false (zeros are not diplayed) #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aral
Copy link

@aral aral commented Mar 27, 2023

This enables vhtml to render interpolated numeric zero values.

See #40

aral added 2 commits March 25, 2023 19:26
Specifically check that child nodes are not strictly equal to `false` so that the value zero (0) gets rendered correctly.
Also add explicit checks for `undefined` and `null` (I’ve encountered `undefined` in my testing with [Kitten](https://codeberg.org/kitten/app). Haven’t hit `null` but it would also make it panic, so better safe than sorry). We could use a lax equality comparison (`==`) here but I prefer being explicit about it (but happy either way).
@aral aral changed the title Fixes: Interpolated zero values are taken as false (zeros are not diplayed) Fixes #40: Interpolated zero values are taken as false (zeros are not diplayed) Mar 27, 2023
odinhb added a commit to dodoas/stringjsx that referenced this pull request Mar 8, 2024
fixes developit#40
and developit#37

inspired by developit#41

The only place we don't have parity right now is arrays (because that's
how children are passed) and bigint (because I'm not gonna do dependency
wrangling rn)
odinhb added a commit to dodoas/stringjsx that referenced this pull request Mar 8, 2024
fixes developit#40
and developit#37

inspired by developit#41

The only place we don't have parity right now is arrays (because that's
how children are passed) and bigint (because I'm not gonna do dependency
wrangling rn)
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 this pull request may close these issues.

1 participant