diff --git a/lib/6to5/traverse/index.js b/lib/6to5/traverse/index.js index 204969d2a2..22cd2b00ba 100644 --- a/lib/6to5/traverse/index.js +++ b/lib/6to5/traverse/index.js @@ -107,6 +107,11 @@ function traverse(parent, opts, scope) { if (updated) { parent[key] = _.flatten(parent[key]); + + if (key === "body") { + // we can safely compact this + parent[key] = _.compact(parent[key]); + } } } else { handle(parent, key);