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

Leaf 3 seems to return true for #if(somevar) even when somevar isn't set #80

Closed
twostraws opened this issue Nov 30, 2017 · 1 comment
Closed

Comments

@twostraws
Copy link

Leaf 2 allowed us to check whether a variable was set in the current context by writing #if(somevar), but in Leaf 3 this no longer works.

To reproduce the problem, creating the following Leaf template:

#if(haters) {
    <p>The "haters" variable is set to #(haters)</p>
}

#if(fakers) {
    <p>The "fakers" variable is set to #(fakers)</p>
}

If you render that template with the context ["haters": "hating"] you would expect the first message to be printed but not the second, but as of 3.0 alpha 4 both messages are printed.

@twostraws
Copy link
Author

This was resolved in later alphas.

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

No branches or pull requests

1 participant