diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-05-10 01:22:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-10 01:22:44 +0800 |
commit | 5476cb8f05d0e7d402d583ef726e743451555c10 (patch) | |
tree | 41a45da197ce1c52387d7bf738ebed552814751b /test/compress/collapse_vars.js | |
parent | 6a30e1d6bed66512d33dbb83adc954b43fe2823e (diff) | |
download | tracifyjs-5476cb8f05d0e7d402d583ef726e743451555c10.tar.gz tracifyjs-5476cb8f05d0e7d402d583ef726e743451555c10.zip |
fix corner case in `inline` (#3401)
fixes #3400
Diffstat (limited to 'test/compress/collapse_vars.js')
-rw-r--r-- | test/compress/collapse_vars.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js index 6e0afc6e..1862687a 100644 --- a/test/compress/collapse_vars.js +++ b/test/compress/collapse_vars.js @@ -3497,10 +3497,10 @@ issue_2437_1: { return Object.defineProperty(XMLHttpRequest.prototype, "onreadystatechange", xhrDesc || {}), result; } - var req, detectFunc = function(){}; - (req = new XMLHttpRequest()).onreadystatechange = detectFunc; - result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc; - return req.onreadystatechange = null, result; + var req = new XMLHttpRequest(), detectFunc = function(){}; + return req.onreadystatechange = detectFunc, + result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc, + req.onreadystatechange = null, result; }()); } } @@ -3545,8 +3545,8 @@ issue_2437_2: { if (xhrDesc) return (req = new XMLHttpRequest()).onreadystatechange, Object.defineProperty(XMLHttpRequest.prototype, "onreadystatechange", xhrDesc || {}); - var req; - (req = new XMLHttpRequest).onreadystatechange = function(){}, + var req = new XMLHttpRequest(); + req.onreadystatechange = function(){}, req[SYMBOL_FAKE_ONREADYSTATECHANGE_1], req.onreadystatechange = null; }(); |