fix(scanner) try a trivia scan only if pos === 0

This commit is contained in:
Basarat Syed 2015-08-20 17:45:54 +10:00
parent 069d2dc724
commit 042e1bbd91

View File

@ -472,7 +472,7 @@ namespace ts {
break;
case CharacterCodes.hash:
if (isShebangTrivia(text, pos)) {
if (pos === 0 && isShebangTrivia(text, pos)) {
pos = scanShebangTrivia(text, pos);
continue;
}