Throw a handlebars exception when attempting to use template partials in VM mode.

This commit is contained in:
kpdecker
2011-07-30 16:01:43 -05:00
parent 8e23ce87d3
commit ccf32821df
2 changed files with 14 additions and 1 deletions
+3 -1
View File
@@ -71,8 +71,10 @@ Handlebars.VM = {
throw new Handlebars.Exception("The partial " + name + " could not be found");
} else if(partial instanceof Function) {
return partial(context, {helpers: helpers, partials: partials});
} else if (false && !Handlebars.compile) {
throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in vm mode");
} else {
partials[name] = Handlebars.VM.compile(partial);
partials[name] = Handlebars.compile(partial);
return partials[name](context, {helpers: helpers, partials: partials});
}
}