Registering undefined partial throws exception.

This commit is contained in:
Maxb
2014-09-19 11:35:16 -07:00
parent 3133af2a21
commit a0e2e200d9
2 changed files with 10 additions and 0 deletions
+3
View File
@@ -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;
}
},