File tree Expand file tree Collapse file tree 3 files changed +239
-166
lines changed Expand file tree Collapse file tree 3 files changed +239
-166
lines changed Original file line number Diff line number Diff line change @@ -780,7 +780,7 @@ namespace ts {
780
780
( hostSourceFileInfo as FilePresentOnHost ) . fileWatcher . close ( ) ;
781
781
}
782
782
sourceFilesCache . delete ( oldSourceFile . resolvedPath ) ;
783
- if ( oldSourceFile . resolvedPath === oldSourceFile . path || ! hasSourceFileByPath ) {
783
+ if ( ! hasSourceFileByPath ) {
784
784
resolutionCache . removeResolutionsOfFile ( oldSourceFile . path ) ;
785
785
}
786
786
}
Original file line number Diff line number Diff line change @@ -925,8 +925,8 @@ namespace ts.server {
925
925
const newFile = this . program . getSourceFileByPath ( f . resolvedPath ) ;
926
926
if ( ! newFile || ( f . resolvedPath === f . path && newFile . resolvedPath !== f . path ) ) {
927
927
// new program does not contain this file - detach it from the project
928
- // - remove resolutions only if this is undirected file or doesnt have source file with the path in new program
929
- this . detachScriptInfoFromProject ( f . fileName , f . path !== f . resolvedPath && ! ! this . program . getSourceFileByPath ( f . path ) ) ;
928
+ // - remove resolutions only if the new program doesnt contain source file by the path (not resolvedPath since path is used for resolution)
929
+ this . detachScriptInfoFromProject ( f . fileName , ! ! this . program . getSourceFileByPath ( f . path ) ) ;
930
930
}
931
931
}
932
932
You can’t perform that action at this time.
0 commit comments