If the partial is not found, an exception should be thrown
This commit is contained in:
@@ -615,7 +615,9 @@ Handlebars.VM = {
|
||||
return new Handlebars.JavaScriptCompiler().compile(environment);
|
||||
},
|
||||
invokePartial: function(partial, name, context, helpers, partials) {
|
||||
if(partial instanceof Function) {
|
||||
if(partial === undefined) {
|
||||
throw new Handlebars.Exception("The partial " + name + " could not be found");
|
||||
} else if(partial instanceof Function) {
|
||||
return partial(context, helpers, partials);
|
||||
} else {
|
||||
partials[name] = Handlebars.VM.compile(partial);
|
||||
|
||||
Reference in New Issue
Block a user