-
Notifications
You must be signed in to change notification settings - Fork 221
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
[Question] #if built in helper is not working as expected #594
Comments
Yes, #if follows the truthy rules of JavaScript, so a non-empty string is truthy. |
But result of my |
No, it’s “False” |
You mean I tried |
No matter what, it will produce a string. |
Any way,the only solution just like below code: |
writer.Write(""); can be work! |
I am using the
#if
helper, but it is not working as expected. Below is myequal
helper code (exception handling removed for clarity):Template:
I am printing the result of
{{equal (record_count VerifiedList) 1}}
and it correctly showsFalse
. However, my{{#if...
condition is not rendering the else part in the template output. It prints "is ready to pay." even though VerifiedList has 2 records andrecord_count
returns it correctly.Could the issue be that the
equal
helper is writing "False" as astring
instead of aboolean
?Output
The text was updated successfully, but these errors were encountered: