enhance join_vars (#5739)

This commit is contained in:
Alex Lam S.L
2022-11-22 17:57:16 +00:00
committed by GitHub
parent 68d62a8a31
commit e5cbd3e0f3
4 changed files with 195 additions and 26 deletions

View File

@@ -41,6 +41,11 @@ rm -rf tmp/buble \
@@ -309 +309 @@ export default class BlockStatement extends Node {
- let cont = false; // TODO implement proper continue...
+ let cont = !declarations; // TODO implement proper continue...
--- a/src/program/types/VariableDeclaration.js
+++ b/src/program/types/VariableDeclaration.js
@@ -38 +38 @@ export default class VariableDeclaration extends Node {
- code.remove(c, declarator.id.start);
+ code.remove(c, declarator.id.start, lastDeclaratorIsPattern);
EOF
ERR=$?; if [ "$ERR" != "0" ]; then echo "Error: $ERR"; exit $ERR; fi
minify_in_situ "src" \