aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js
index bcffd8b8..8652d6e4 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -4957,7 +4957,10 @@ merge(Compressor.prototype, {
node.right.walk(tw);
var marker = new TreeWalker(function(node) {
if (node instanceof AST_Destructured) return;
- if (node instanceof AST_DestructuredKeyVal) {
+ if (node instanceof AST_DefaultValue) {
+ node.value.walk(tw);
+ node.name.walk(marker);
+ } else if (node instanceof AST_DestructuredKeyVal) {
if (node.key instanceof AST_Node) {
push();
segment.block = node;
@@ -5177,7 +5180,7 @@ merge(Compressor.prototype, {
node.name.mark_symbol(node.value ? function(node) {
if (!(node instanceof AST_SymbolDeclaration)) return;
if (node instanceof AST_SymbolVar) {
- mark(node, false);
+ mark(node);
} else {
references[node.definition().id] = false;
}