Fix #4578: Never look back past the start of the token stream (#4662)

This commit is contained in:
Geoffrey Booth
2017-08-24 00:02:57 -07:00
committed by GitHub
parent 40c351135a
commit 892c4699dd
2 changed files with 2 additions and 2 deletions

View File

@@ -309,7 +309,7 @@ exports.Rewriter = class Rewriter
when @tag(i - 2) is '@' then i - 2
else i - 1
startsLine = s is 0 or @tag(s - 1) in LINEBREAKS or tokens[s - 1].newLine
startsLine = s <= 0 or @tag(s - 1) in LINEBREAKS or tokens[s - 1].newLine
# Are we just continuing an already declared object?
if stackTop()
[stackTag, stackIdx] = stackTop()