fix output for arrays containing undefined values

[1,,2,] ==> [1,,2] instead of [1,undefined,2]
This commit is contained in:
Mihai Bazon
2012-08-28 15:38:35 +03:00
parent 7fcb6bcb12
commit 1b6bcca717

View File

@@ -812,7 +812,8 @@ function OutputStream(options) {
if (len > 0) output.space();
a.forEach(function(exp, i){
if (i) output.comma();
exp.print(output);
if (!(exp instanceof AST_Undefined))
exp.print(output);
});
if (len > 0) output.space();
});