summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/base.js
diff options
context:
space:
mode:
authorMaxb <maxb.personal@gmail.com>2014-09-19 11:35:16 -0700
committerMaxb <maxb.personal@gmail.com>2014-09-19 11:35:16 -0700
commita0e2e200d91c719f6475f91f20fdaea2b7886340 (patch)
treedab8789f3dce1f672b5c528435268e0e34608f5c /lib/handlebars/base.js
parent3133af2a210a15223f441d75aa795f3e44bab3dd (diff)
downloadhandlebars.js-a0e2e200d91c719f6475f91f20fdaea2b7886340.zip
handlebars.js-a0e2e200d91c719f6475f91f20fdaea2b7886340.tar.gz
handlebars.js-a0e2e200d91c719f6475f91f20fdaea2b7886340.tar.bz2
Registering undefined partial throws exception.
Diffstat (limited to 'lib/handlebars/base.js')
-rw-r--r--lib/handlebars/base.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js
index 76f53e2..e0fda81 100644
--- a/lib/handlebars/base.js
+++ b/lib/handlebars/base.js
@@ -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;
}
},