When rendering the template with this context, {{else}} is being rendered because paragraphs is missing in the context. With native handlebars.js, this generates the following result:
This PR fixes the issue by passing input data of the current scope to the else callback in Runtime::sec(). In addition, a test case is added which covers the above scenario.
Problem
Given the following Handlebars template:
Given the following context:
When rendering the template with this context,
{{else}}
is being rendered becauseparagraphs
is missing in the context. With native handlebars.js, this generates the following result:However, when rendering the same template and context with lightncandy, the result is:
Solution
This PR fixes the issue by passing input data of the current scope to the
else
callback inRuntime::sec()
. In addition, a test case is added which covers the above scenario.