Skip to content

Commit

Permalink
fixed issue #69
Browse files Browse the repository at this point in the history
  • Loading branch information
mishoo committed Dec 17, 2010
1 parent d643f2a commit cd78ff5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,9 @@ function gen_code(ast, beautify) {
},
"array": function(elements) {
if (elements.length == 0) return "[]";
return add_spaces([ "[", add_commas(MAP(elements, make)), "]" ]);
return add_spaces([ "[", add_commas(MAP(elements, function(el){
return parenthesize(el, "seq");
})), "]" ]);
},
"stat": function(stmt) {
return make(stmt).replace(/;*\s*$/, ";");
Expand Down
1 change: 1 addition & 0 deletions test/unit/compress/expected/issue69.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[(a,b)]
1 change: 1 addition & 0 deletions test/unit/compress/test/issue69.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[(a,b)]

0 comments on commit cd78ff5

Please sign in to comment.