diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-03-31 15:26:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-31 15:26:57 +0800 |
commit | 11e9bdc42746832cfa1c52ca70b0171b31a422ba (patch) | |
tree | 7c8c7f5944cbb2f29981cdf5dc48af17a098cf86 /lib | |
parent | a84564d1a8b1fda740963a577f4916d15a20138b (diff) | |
download | tracifyjs-11e9bdc42746832cfa1c52ca70b0171b31a422ba.tar.gz tracifyjs-11e9bdc42746832cfa1c52ca70b0171b31a422ba.zip |
fix missing preamble when shebang is absent (#1742)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/output.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/output.js b/lib/output.js index c8c8739f..ac9e0654 100644 --- a/lib/output.js +++ b/lib/output.js @@ -510,8 +510,8 @@ function OutputStream(options) { })); } - if (comments.length > 0 && output.pos() == 0) { - if (output.option("shebang") && comments[0].type == "comment5") { + if (output.pos() == 0) { + if (comments.length > 0 && output.option("shebang") && comments[0].type == "comment5") { output.print("#!" + comments.shift().value + "\n"); output.indent(); } |