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 originally opened this in handlebars.js (see handlebars-lang/handlebars.js#1327 for more background). With more digging, we discovered the issue is due to the fact that in node_modules/consolidate/lib/consolidate.js you are passing "options" (which is the data for the template) into the engine.compile() method as well as the tmpl() method:
var tmpl = cache(options) || cache(options, engine.compile(str, options));
fn(null, tmpl(options));
The official way to use the plugin is something like:
var template = Handlebars.compile(tplStr, tplOpt);
document.getElementById('output').innerHTML = template(tplData);
where the data for the template is not also passed as the options for the compile method.
@nknapphttps://github.com/nknapp said he would look into why compile is altering the options, and he thought you guys could look into why the template data is doubling for the options.
The text was updated successfully, but these errors were encountered:
I originally opened this in handlebars.js (see handlebars-lang/handlebars.js#1327 for more background). With more digging, we discovered the issue is due to the fact that in
node_modules/consolidate/lib/consolidate.js
you are passing "options" (which is the data for the template) into theengine.compile()
method as well as thetmpl()
method:The official way to use the plugin is something like:
where the data for the template is not also passed as the options for the compile method.
@nknapp https://github.com/nknapp said he would look into why
compile
is altering the options, and he thought you guys could look into why the template data is doubling for the options.The text was updated successfully, but these errors were encountered: