Merge pull request #310 from redpie/fix-registerPartial-data
Ensure plain text partials supplied to registerPartials are compiled using data: true if necessary.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user