diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-08-28 15:38:35 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-08-28 15:38:35 +0300 |
commit | 1b6bcca7170c8f08f255448533c211cdb1010f34 (patch) | |
tree | 6f49400e94b0c8bb718e410b6128556004100266 | |
parent | 7fcb6bcb1270d1688512e25704125edb5b35b3c5 (diff) | |
download | tracifyjs-1b6bcca7170c8f08f255448533c211cdb1010f34.tar.gz tracifyjs-1b6bcca7170c8f08f255448533c211cdb1010f34.zip |
fix output for arrays containing undefined values
[1,,2,] ==> [1,,2] instead of [1,undefined,2]
-rw-r--r-- | lib/output.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/output.js b/lib/output.js index 7cd3e3c0..5f2f46d1 100644 --- a/lib/output.js +++ b/lib/output.js @@ -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(); }); |