mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix incorrect assert about configFileName when watch is created with explicit options, projectReferences etc (#53468)
This commit is contained in:
@@ -1088,7 +1088,6 @@ export function createWatchProgram<T extends BuilderProgram>(host: WatchCompiler
|
||||
}
|
||||
|
||||
function updateExtendedConfigFilesWatches(forProjectPath: Path, options: CompilerOptions | undefined, watchOptions: WatchOptions | undefined, watchType: WatchTypeRegistry["ExtendedConfigFile"] | WatchTypeRegistry["ExtendedConfigOfReferencedProject"]) {
|
||||
Debug.assert(configFileName);
|
||||
updateSharedExtendedConfigFileWatcher(
|
||||
forProjectPath,
|
||||
options,
|
||||
@@ -1104,7 +1103,7 @@ export function createWatchProgram<T extends BuilderProgram>(host: WatchCompiler
|
||||
// If there are no referenced projects this extended config file watcher depend on ignore
|
||||
if (!projects?.size) return;
|
||||
projects.forEach(projectPath => {
|
||||
if (toPath(configFileName) === projectPath) {
|
||||
if (configFileName && toPath(configFileName) === projectPath) {
|
||||
// If this is the config file of the project, reload completely
|
||||
reloadLevel = ConfigFileProgramReloadLevel.Full;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user