File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -2356,7 +2356,7 @@ Compressor.prototype.compress = function(node) {
2356
2356
if (prop.key instanceof AST_Node) prop.key = prop.key.transform(tt);
2357
2357
if (prop.static) {
2358
2358
if (prop instanceof AST_ClassField) {
2359
- props.push(prop);
2359
+ if (prop.value) props.push(prop);
2360
2360
} else if (prop instanceof AST_ClassInit) {
2361
2361
props.unshift(prop);
2362
2362
}
Original file line number Diff line number Diff line change @@ -3179,3 +3179,25 @@ issue_5502: {
3179
3179
expect_stdout: "PASS 42"
3180
3180
node_version: ">=12"
3181
3181
}
3182
+
3183
+ issue_5504: {
3184
+ options = {
3185
+ collapse_vars : true ,
3186
+ }
3187
+ input: {
3188
+ "use strict" ;
3189
+ var a ;
3190
+ console . log ( ( a = 42 , class {
3191
+ static p ;
3192
+ } ) . p ) ;
3193
+ }
3194
+ expect: {
3195
+ "use strict" ;
3196
+ var a ;
3197
+ console . log ( ( a = 42 , class {
3198
+ static p ;
3199
+ } ) . p ) ;
3200
+ }
3201
+ expect_stdout: "undefined"
3202
+ node_version: ">=12"
3203
+ }
You can’t perform that action at this time.
0 commit comments