aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 1714306e..dcb2cc4c 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -6143,8 +6143,9 @@ merge(Compressor.prototype, {
var values = value instanceof AST_Array && value.elements;
var elements = [];
node.elements.forEach(function(element, index) {
- if (element instanceof AST_Hole) return;
value = values && values[index];
+ if (value instanceof AST_Spread) value = values = null;
+ if (element instanceof AST_Hole) return;
element = element.transform(trimmer);
if (element) elements[index] = element;
});