Skip to content

Commit e313e2e

Browse files
committed
Move cheaper check earlier in condition
1 parent 5daa1fc commit e313e2e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/compiler/scanner.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,9 +1361,9 @@ namespace ts {
13611361
if (text.charCodeAt(pos + 1) === CharacterCodes.equals) {
13621362
return pos += 2, token = SyntaxKind.LessThanEqualsToken;
13631363
}
1364-
if (text.charCodeAt(pos + 1) === CharacterCodes.slash &&
1365-
text.charCodeAt(pos + 2) !== CharacterCodes.asterisk &&
1366-
languageVariant === LanguageVariant.JSX) {
1364+
if (languageVariant === LanguageVariant.JSX &&
1365+
text.charCodeAt(pos + 1) === CharacterCodes.slash &&
1366+
text.charCodeAt(pos + 2) !== CharacterCodes.asterisk) {
13671367
return pos += 2, token = SyntaxKind.LessThanSlashToken;
13681368
}
13691369
return pos++, token = SyntaxKind.LessThanToken;

0 commit comments

Comments
 (0)