
Loading…
[1.0] dom-if : undefined is considered falsy only once #1742
cedric-marcone
commented
cedric-marcone
commented
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
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 :)