Skip to content

Commit

Permalink
Merge pull request handlebars-lang#310 from redpie/fix-registerPartia…
Browse files Browse the repository at this point in the history
…l-data

Ensure plain text partials supplied to registerPartials are compiled using data: true if necessary.
  • Loading branch information
wycats committed Sep 15, 2012
2 parents 647ee28 + 967c69b commit f6aea81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/handlebars/runtime.js
Expand Up @@ -56,7 +56,7 @@ Handlebars.VM = {
} else if (!Handlebars.compile) {
throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
} else {
partials[name] = Handlebars.compile(partial);
partials[name] = Handlebars.compile(partial, {data: data !== undefined});
return partials[name](context, options);
}
}
Expand Down

0 comments on commit f6aea81

Please sign in to comment.