diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-19 21:47:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-20 05:47:01 +0800 |
commit | 87cf7152135281a4b1a1163b26ea918a0a264f0b (patch) | |
tree | 41dd955905f0eebf5cd9f2f215bb26653cbb2a4e /README.md | |
parent | 2c9c72e06c674ae313001d0b5878fe2ccfc31492 (diff) | |
download | tracifyjs-87cf7152135281a4b1a1163b26ea918a0a264f0b.tar.gz tracifyjs-87cf7152135281a4b1a1163b26ea918a0a264f0b.zip |
fix corner case with destructuring `catch` (#4421)
fixes #4420
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1209,6 +1209,20 @@ To allow for better optimizations, the compiler makes various assumptions: `function({}, arguments) {}` will result in `SyntaxError` in earlier versions of Chrome and Node.js - UglifyJS may modify the input which in turn may suppress those errors. +- Earlier versions of Chrome and Node.js will throw `ReferenceError` with the + following: + ```js + var a; + try { + throw 42; + } catch ({ + [a]: b, + // ReferenceError: a is not defined + }) { + let a; + } + ``` + UglifyJS may modify the input which in turn may suppress those errors. - Later versions of JavaScript will throw `SyntaxError` with the following: ```js a => { |