diff options
author | alexlamsl <alexlamsl@gmail.com> | 2017-02-18 18:58:23 +0800 |
---|---|---|
committer | alexlamsl <alexlamsl@gmail.com> | 2017-02-18 18:58:23 +0800 |
commit | 11676f9d72e667ea14ce380ed448da948e79f85e (patch) | |
tree | b55b2578ae55d87bd4537565fc416c9944d3a22b /lib | |
parent | dd31d12a9110b34c1b45a72b6e1f2b64c2d7afe9 (diff) | |
download | tracifyjs-11676f9d72e667ea14ce380ed448da948e79f85e.tar.gz tracifyjs-11676f9d72e667ea14ce380ed448da948e79f85e.zip |
fix crash in unsafe replacement of undefined
remove extraneous call to AST_SymbolRef.reference()
closes #1443
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/compress.js b/lib/compress.js index 04aa1072..a15206e8 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -2721,13 +2721,11 @@ merge(Compressor.prototype, { var scope = compressor.find_parent(AST_Scope); var undef = scope.find_variable("undefined"); if (undef) { - var ref = make_node(AST_SymbolRef, self, { + return make_node(AST_SymbolRef, self, { name : "undefined", scope : scope, thedef : undef }); - ref.reference(); - return ref; } } return self; |