question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Boolean `false` converted to string "false"

See original GitHub issue

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! 👋

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
jorgebucarancommented, Mar 11, 2017

@substack Do you think #35 can be merged?

0reactions
jorgebucarancommented, Feb 16, 2017

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I convert a string to boolean in JavaScript?
If you want string 'true' to return boolean true and string 'false' to return boolean false , then the simplest solution is to...
Read more >
Convert String to Boolean in JavaScript - Stack Abuse
The simplest way to do so is to use the strict equality operator to compare our string value to the "true" - if...
Read more >
2 Ways to Convert Values to Boolean in JavaScript
The first ! coerce the value to a boolean and inverse it. In this case, !value will return false . So to reverse...
Read more >
How to convert string to boolean JavaScript - Educative.io
In this shot, we will cover how to convert a string into its boolean representation. The easiest way to convert string to boolean...
Read more >
How to Convert Bool (True/False) to a String in Python? - Finxter
To convert a given Boolean value to a string in Python, use the str(boolean) function and pass the Boolean value into it. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found