-
Notifications
You must be signed in to change notification settings - Fork 395
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
Change {{#with obj}} to not render if obj is falsey #1856
Comments
Shouldn't it also have the ability for an |
It does already, added it last release. :) I t's just kind of weird in that else works when falsey, but if you don't have an else block it runs the with with the empty object. Another reason to fix it up. |
Oh, sweet! I totally missed that addition. Time to go edit some templates... |
This behavior still occurs in 0.8-edge: http://jsfiddle.net/jwk54ah9/1/ |
So... am I reading too much into this or does it mean the answer to #2024 should be "an empty object ist falsey"? |
@skeptic35 yes, for explicit |
Damn, I'm always sooo late. I know it's long past, and I don't expect it to change, just wanted to add my grain of salt. IMHO making
Must always now be written more verbosely:
|
@dagnelies I'm right there with you. I was using something like that in a few places too, and I think an empty object not being used as context is actually a regression. I think it should still act like an |
I totally agree, because I also had problems with this. |
@Rich-Harris brought this up in a comment here and I agree that
{{#with obj}}
should not render ifobj
is falsey.The text was updated successfully, but these errors were encountered: