summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/visitor.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/compiler/visitor.js')
-rw-r--r--lib/handlebars/compiler/visitor.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/handlebars/compiler/visitor.js b/lib/handlebars/compiler/visitor.js
index ba7b376..47f86e0 100644
--- a/lib/handlebars/compiler/visitor.js
+++ b/lib/handlebars/compiler/visitor.js
@@ -1,5 +1,4 @@
import Exception from '../exception';
-import AST from './ast';
function Visitor() {
this.parents = [];
@@ -14,7 +13,7 @@ Visitor.prototype = {
let value = this.accept(node[name]);
if (this.mutating) {
// Hacky sanity check:
- if (value && (!value.type || !AST[value.type])) {
+ if (value && typeof value.type !== 'string') {
throw new Exception('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type);
}
node[name] = value;