diff --git a/tools/babel_asttool.js b/tools/babel_asttool.js index 9e154b7..be6649d 100644 --- a/tools/babel_asttool.js +++ b/tools/babel_asttool.js @@ -32489,11 +32489,13 @@ function MergeObj(path) { } }) paths.map(function(refer_path) { - let bindpath = refer_path.parentPath; - if (!t.isVariableDeclarator(bindpath.node)) return; - let bindname = bindpath.node.id.name; - bindpath.scope.rename(bindname, name, bindpath.scope.block); - bindpath.remove(); + try{ + let bindpath = refer_path.parentPath; + if (!t.isVariableDeclarator(bindpath.node)) return; + let bindname = bindpath.node.id.name; + bindpath.scope.rename(bindname, name, bindpath.scope.block); + bindpath.remove(); + }catch(e){} }); }