diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-01-03 03:09:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-03 11:09:10 +0800 |
commit | 623a0d920f66656d7874a4bf005c24b44abb95a4 (patch) | |
tree | 2f8a295445917c664bfda99771ffb2c61e1ef89a | |
parent | e8c04f8cb691ee132c7d3b0b10db0d7da8ce3bf6 (diff) | |
download | tracifyjs-623a0d920f66656d7874a4bf005c24b44abb95a4.tar.gz tracifyjs-623a0d920f66656d7874a4bf005c24b44abb95a4.zip |
fix toggling of AST validation (#4499)
-rw-r--r-- | lib/ast.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -160,6 +160,8 @@ var restore_transforms = []; AST_Node.enable_validation = function() { AST_Node.disable_validation(); (function validate_transform(ctor) { + ctor.SUBCLASSES.forEach(validate_transform); + if (!HOP(ctor.prototype, "transform")) return; var transform = ctor.prototype.transform; ctor.prototype.transform = function(tw, in_list) { var node = transform.call(this, tw, in_list); @@ -173,7 +175,6 @@ AST_Node.enable_validation = function() { restore_transforms.push(function() { ctor.prototype.transform = transform; }); - ctor.SUBCLASSES.forEach(validate_transform); })(this); }; |