Closed artemipanchuk closed 7 years ago
Thanks for calling this out. Yes, that is a bug. The issue arises when you have a recursive contextual parameter expression, as you do in your template: ~level=~level+1
A simpler repro for the bug is this:
{{include ~level=~level}}
{^{:~level1}}
{{/include}}
I am investigating fixes - I'll let you know...
This has been fixed in commit v0.9.83
Look at following fiddle: https://jsfiddle.net/nm3zw58b/6/. In this fiddle, I am using simplified type of recursive template, used by my tree tag in my project. Template calls itself by using
for
expression, passing new values of~level
and~depth
. So, there isif
expression:With this
if
expression everything works ok. But sometimes I need to pass more sophisticated conditions and expressions, in my case --- with data-link.So there is a bit modified version of my fiddle: https://jsfiddle.net/nm3zw58b/7/. The only difference is: {^{if ~level !== 0}}.
With this change everything goes into infinite loop.