Skip to content

Commit 042e1bb

Browse files
committed
fix(scanner) try a trivia scan only if pos === 0
1 parent 069d2dc commit 042e1bb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/scanner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ namespace ts {
472472
break;
473473

474474
case CharacterCodes.hash:
475-
if (isShebangTrivia(text, pos)) {
475+
if (pos === 0 && isShebangTrivia(text, pos)) {
476476
pos = scanShebangTrivia(text, pos);
477477
continue;
478478
}

0 commit comments

Comments
 (0)