Navigation Menu

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

[1.0] dom-if : undefined is considered falsy only once #1742

Closed
cedric-marcone opened this issue Jun 4, 2015 · 1 comment
Closed

[1.0] dom-if : undefined is considered falsy only once #1742

cedric-marcone opened this issue Jun 4, 2015 · 1 comment
Assignees
Labels

Comments

@cedric-marcone
Copy link
Contributor

Hey !

In a conditional template, undefined is considered falsy only on the first invocation.
As of today, the only way to handle this use case is to declare a boolean computed property that returns false if the target value is undefined.

I made the following jsbin to reproduce the bug :
http://jsbin.com/retejotege/1/edit?html,output

Hope that helps :)

@cedric-marcone
Copy link
Contributor Author

If you need more info, feel free to tell me.
I'm porting a big codebase and it's biting me real hard :)
I need to write a lot of computed properties to make it work right with dom-if and dom-repeat underlying performance optimizations and I really would like to unclutter my code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants