Registering undefined partial throws exception.
This commit is contained in:
@@ -47,6 +47,9 @@ HandlebarsEnvironment.prototype = {
|
||||
if (toString.call(name) === objectType) {
|
||||
Utils.extend(this.partials, name);
|
||||
} else {
|
||||
if (typeof partial === 'undefined') {
|
||||
throw new Exception('Attempting to register a partial as undefined');
|
||||
}
|
||||
this.partials[name] = partial;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user