aboutsummaryrefslogtreecommitdiff
path: root/lib/output.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-10-20 03:21:30 +0800
committerGitHub <noreply@github.com>2019-10-20 03:21:30 +0800
commit543dd7d3d750e83b00e50bbf74fa786a7c1d243e (patch)
tree24fae6f9d8fa4996cb4a140eac0780a994023593 /lib/output.js
parent6b4886c908c6415a397539701117cd493545d21b (diff)
downloadtracifyjs-543dd7d3d750e83b00e50bbf74fa786a7c1d243e.tar.gz
tracifyjs-543dd7d3d750e83b00e50bbf74fa786a7c1d243e.zip
fix corner case in `comments` (#3500)
Diffstat (limited to 'lib/output.js')
-rw-r--r--lib/output.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/output.js b/lib/output.js
index 827fa43a..b9d8a137 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -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) {