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) {
23562356 if (prop.key instanceof AST_Node) prop.key = prop.key.transform(tt);
23572357 if (prop.static) {
23582358 if (prop instanceof AST_ClassField) {
2359- props.push(prop);
2359+ if (prop.value) props.push(prop);
23602360 } else if (prop instanceof AST_ClassInit) {
23612361 props.unshift(prop);
23622362 }
Original file line number Diff line number Diff line change @@ -3179,3 +3179,25 @@ issue_5502: {
31793179 expect_stdout: "PASS 42"
31803180 node_version: ">=12"
31813181}
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