fix corner case in comments (#3500)

This commit is contained in:
Alex Lam S.L
2019-10-20 03:21:30 +08:00
committed by GitHub
parent 6b4886c908
commit 543dd7d3d7
2 changed files with 76 additions and 45 deletions

View File

@@ -452,7 +452,7 @@ function OutputStream(options) {
var self = this;
var scan = node instanceof AST_Exit && node.value;
var comments = dump(node);
if (!comments) return;
if (!comments) comments = [];
if (scan) {
var tw = new TreeWalker(function(node) {