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

Boolean false converted to string "false" #42

Closed
jorgebucaran opened this issue Feb 16, 2017 · 5 comments
Closed

Boolean false converted to string "false" #42

jorgebucaran opened this issue Feb 16, 2017 · 5 comments

Comments

@jorgebucaran
Copy link

jorgebucaran commented Feb 16, 2017

This makes it difficult (or impossible?) for a virtual DOM engine to determine whether the user meant false or "false".

html`${true}` // yields true
html`${false}` // yields "false"

screen shot 2017-02-17 at 1 02 04

If this is indeed determined to be a bug, I'd be delighted to help with if you'd be so kind to offer some help by pointing out where should I start looking in the code.

Cheers! 👋

@slaskis
Copy link
Collaborator

slaskis commented Feb 16, 2017

There's a PR to fix this: #35

@jorgebucaran
Copy link
Author

@slaskis Why hasn't it been merged? 🤔

@slaskis
Copy link
Collaborator

slaskis commented Feb 16, 2017

In part because of this which might make it a possible breaking change for some. So I just wanted it reviewed/accepted by someone first.

But then I don't use this library much anymore so I kind of forgot 🤷‍♂️

@jorgebucaran
Copy link
Author

Thanks. I think we can all agree hyperx should be agnostic about vdom implementations. So, perhaps your PR could be merged and that str.replace issue taken upstream to virtual-dom?

@jorgebucaran
Copy link
Author

@substack Do you think #35 can be merged?

jorgebucaran pushed a commit to jorgebucaran/hyperapp that referenced this issue Mar 11, 2017
* Also remove redundant boolean/string checks when using
  setElementData/updateElementData, etc.

* This temporarily breaks Hyperx until choojs/hyperx/issues/42
  is resolved.
jorgebucaran added a commit to jorgebucaran/hyperapp that referenced this issue Jan 7, 2018
* Also remove redundant boolean/string checks when using
  setElementData/updateElementData, etc.

* This temporarily breaks Hyperx until choojs/hyperx/issues/42
  is resolved.
chief825 added a commit to chief825/hyperapp that referenced this issue Mar 31, 2022
* Also remove redundant boolean/string checks when using
  setElementData/updateElementData, etc.

* This temporarily breaks Hyperx until choojs/hyperx/issues/42
  is resolved.
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