Skip to content

Commit c7b2d92

Browse files
committed
PR feedback
1 parent 579748b commit c7b2d92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,6 @@ namespace ts {
702702
initializeState(sourceText, languageVersion, syntaxCursor, ScriptKind.JSON);
703703
// Set source file so that errors will be reported with this file name
704704
sourceFile = createSourceFile(fileName, ScriptTarget.ES2015, ScriptKind.JSON, /*isDeclaration*/ false);
705-
const result = sourceFile as JsonSourceFile;
706705

707706
// Prime the scanner.
708707
nextToken();
@@ -751,6 +750,7 @@ namespace ts {
751750
}
752751

753752
sourceFile.parseDiagnostics = parseDiagnostics;
753+
const result = sourceFile as JsonSourceFile;
754754
clearState();
755755
return result;
756756
}

0 commit comments

Comments
 (0)