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 am debugging an issue when trying to use a named variable and a custom helper without a supplemental json context in the sub-context of a #with block.
{{#with ($timeBetween ($now) "2024-03-05 08:00:00") as |days|~}}
There are {{days}} between {{$now}} and 2024-03-05.
{{/with}}
Is rendered as: There are 6 between and 2024-03-05.
I stepped through the code in a debugger and can confirm that the handlebars library isn't making a second call to the $now helper function. However, if I supply some fake context:
{{#with ($timeBetween ($now) "2024-03-05 08:00:00") as |days|~}}
There are {{days}} between {{$now what}} and 2024-03-05.
{{/with}}
... it renders correctly. This also works: {{#with ($timeBetween ($now) "2024-03-05 08:00:00") as |days|~}} There are {{days}} between {{#$now}}{{/$now}} and 2024-03-05. {{/with}}
But it does seem like this is a bug, because the method call without any arguments should still be recognized.
Thank you!
The text was updated successfully, but these errors were encountered:
Hi,
I am debugging an issue when trying to use a named variable and a custom helper without a supplemental json context in the sub-context of a #with block.
Is rendered as:
There are 6 between and 2024-03-05.
I stepped through the code in a debugger and can confirm that the handlebars library isn't making a second call to the $now helper function. However, if I supply some fake context:
... it renders correctly. This also works:
{{#with ($timeBetween ($now) "2024-03-05 08:00:00") as |days|~}} There are {{days}} between {{#$now}}{{/$now}} and 2024-03-05. {{/with}}
But it does seem like this is a bug, because the method call without any arguments should still be recognized.
Thank you!
The text was updated successfully, but these errors were encountered: