[Question] How to change root vars inside block helper
Opened this issue · 0 comments
mruslan97 commented
Hi all! I'm trying to write a block helper which fill context var.
Root access example:
handlebars.RegisterHelper("example", (output, options, context, arguments) =>
{
count++;
Console.WriteLine($"helper calls: {count}");
var root = (JObject)options.Data["root"];
root["someVar"] = root["someVar"].ToString() + count;
What is the reason and how do I fix this?