diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-20 03:22:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-20 11:22:45 +0800 |
commit | caea6aac81555040071c21e9e35888f78aeb5a82 (patch) | |
tree | 5dbc98bc4b77a73349472f109cef2bce7fa5b983 /test/reduce.js | |
parent | f5224ca1f5075d6912616675f1aa7fa8cc7741f1 (diff) | |
download | tracifyjs-caea6aac81555040071c21e9e35888f78aeb5a82.tar.gz tracifyjs-caea6aac81555040071c21e9e35888f78aeb5a82.zip |
handle destructuring `catch` in `--reduce-test` (#4427)
Diffstat (limited to 'test/reduce.js')
-rw-r--r-- | test/reduce.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/reduce.js b/test/reduce.js index 1ab18411..bcb30fe8 100644 --- a/test/reduce.js +++ b/test/reduce.js @@ -465,7 +465,7 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options) if (node.TYPE == "Call" && node.expression.print_to_string() == "console.log") { return to_sequence(node.args); } - if (node instanceof U.AST_Catch && node.argname) { + if (node instanceof U.AST_Catch && node.argname instanceof U.AST_SymbolCatch) { descend(node, this); node.body.unshift(new U.AST_SimpleStatement({ body: wrap_with_console_log(new U.AST_SymbolRef(node.argname)), |