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.

Clarify "falsy" values

See original GitHub issue

https://vuejs.org/v2/guide/syntax.html#Attributes

It also works for boolean attributes - the attribute will be removed if the condition evaluates to a falsy value

In fact, binding an attribute to 0 or NaN won’t result in removing the attribute. It’s not a normal case but the doc should be more precise on this IMO.

via https://github.com/vuejs/cn.vuejs.org/issues/586

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sdrascommented, Nov 11, 2017

Fixed!

0reactions
chrisvfritzcommented, Nov 3, 2017

I see. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clarify "falsy" values · Issue #1250 · vuejs/v2.vuejs.org · GitHub
Clarify "falsy" values #1250 ... It also works for boolean attributes - the attribute will be removed if the condition evaluates to a...
Read more >
The Semantics of Falsy Values - DEV Community ‍ ‍
In this article, I explain the semantics behind these values so that we can be better informed about their proper usage.
Read more >
Falsy Values in JavaScript - freeCodeCamp
A falsy value is something which evaluates to FALSE, for instance when checking a variable. There are only six falsey values in JavaScript: ......
Read more >
How Truthy and Falsy Values in JavaScript Work
Falsy values are values that evaluate to false when JavaScript “converts” them to their Boolean alternatives. First, let's take a look at values ......
Read more >
What Are Truthy and Falsy in JavaScript
In JavaScript one of the primitive types is boolean. A boolean is a value that is either true or false. Additionally, every other...
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