From 1b6bcca7170c8f08f255448533c211cdb1010f34 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Tue, 28 Aug 2012 15:38:35 +0300 Subject: fix output for arrays containing undefined values [1,,2,] ==> [1,,2] instead of [1,undefined,2] --- lib/output.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/output.js') 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(); }); -- cgit v1.2.3