summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/compiler.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r--lib/handlebars/compiler/compiler.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js
index c8db7c9..ad6b861 100644
--- a/lib/handlebars/compiler/compiler.js
+++ b/lib/handlebars/compiler/compiler.js
@@ -90,6 +90,11 @@ Compiler.prototype = {
},
accept: function(node) {
+ /* istanbul ignore next: Sanity code */
+ if (!this[node.type]) {
+ throw new Exception('Unknown type: ' + node.type, node);
+ }
+
this.sourceNode.unshift(node);
let ret = this[node.type](node);
this.sourceNode.shift();