Fix missing file name of extended source file in synchronizeProjectList when it is missing on disk (#41222)

Fixes #40136
This commit is contained in:
Sheetal Nandi
2020-10-29 12:18:43 -07:00
committed by GitHub
parent 6428140204
commit 6bde4b5c02
2 changed files with 43 additions and 1 deletions

View File

@@ -1578,7 +1578,7 @@ namespace ts {
*/
export function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile {
const textOrDiagnostic = tryReadFile(fileName, readFile);
return isString(textOrDiagnostic) ? parseJsonText(fileName, textOrDiagnostic) : <TsConfigSourceFile>{ parseDiagnostics: [textOrDiagnostic] };
return isString(textOrDiagnostic) ? parseJsonText(fileName, textOrDiagnostic) : <TsConfigSourceFile>{ fileName, parseDiagnostics: [textOrDiagnostic] };
}
/*@internal*/