diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-12-20 17:05:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-20 17:05:53 +0800 |
commit | 7ac7b0872fd8ba6866162697ac6956a737e20a04 (patch) | |
tree | 33edbafc31ab7b7fd93925afa534afaca92b985a | |
parent | 86ae5881b7b269dc656520ff4dddbbd365013a0b (diff) | |
download | tracifyjs-7ac7b0872fd8ba6866162697ac6956a737e20a04.tar.gz tracifyjs-7ac7b0872fd8ba6866162697ac6956a737e20a04.zip |
remove AST hack from `inline` (#2627)
-rw-r--r-- | lib/compress.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index 3410b5a7..85cc6ddf 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -4036,8 +4036,10 @@ merge(Compressor.prototype, { scope.var_names()[name.name] = true; scope.variables.set(name.name, def); scope.enclosed.push(def); + var symbol = make_node(AST_SymbolVar, name, name); + def.orig.push(symbol); decls.unshift(make_node(AST_VarDef, name, { - name: name, + name: symbol, value: null })); var sym = make_node(AST_SymbolRef, name, name); |