You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect the result of expression as 8 since only the first two expression of compare helper are evaluated as being true.
However, I get the output as 1189. I noticed that the helper returns 1 each time it evaluates a true condition and it also outputs result even if the codition does not evaluates true.
I was wondering if anyone can help me to correct the logic of my custom helper?
Thanks!
The text was updated successfully, but these errors were encountered:
I've created a custom helper that evaulates a conditional expression (similar to if with conditional expression) as below:
Here's my template:
And here's the data I've passed:
I've called the render function as below:
$this->handlebars->render($template, $data);
I expect the result of expression as 8 since only the first two expression of compare helper are evaluated as being true.
However, I get the output as 1189. I noticed that the helper returns 1 each time it evaluates a true condition and it also outputs result even if the codition does not evaluates true.
I was wondering if anyone can help me to correct the logic of my custom helper?
Thanks!
The text was updated successfully, but these errors were encountered: