Hi
We are using handlebars to fill out some dynamic messages. Today we noticed a very wierd bug in which result of template({}) is cached. No matter how many ways i tried, (I even imported handlebars in the function but it didn't fix the problem), I get the same result for each combination of variables.
As you can see in the code below, we even compile each template at time of use.
❯ node handlebars.js
details: { status: 'in_progress', ticket_num: 2013 }
text_template(variables): THIS IS A TEST TICKET NUM: 2013 STATUS: in_progress
details: { status: 'not_checked', ticket_num: 2008 }
text_template(variables): THIS IS A TEST TICKET NUM: 2008 STATUS: not_checked
details: { status: 'closed', ticket_num: 2017 }
text_template(variables): THIS IS A TEST TICKET NUM: 2013 STATUS: in_progress
details: { status: 'closed', ticket_num: 2009 }
text_template(variables): THIS IS A TEST TICKET NUM: 2008 STATUS: not_checked
Hi We are using handlebars to fill out some dynamic messages. Today we noticed a very wierd bug in which result of template({}) is cached. No matter how many ways i tried, (I even imported handlebars in the function but it didn't fix the problem), I get the same result for each combination of variables. As you can see in the code below, we even compile each template at time of use.
Example Code to reproduce the bug:
And the result is:
Environment: