Skip to content

Commit

Permalink
Fix incorrectly added resolution to resolutionsWithOnlyAffectingLocat…
Browse files Browse the repository at this point in the history
…ions (#49523)
  • Loading branch information
sheetalkamat authored Jun 14, 2022
1 parent dc6a80b commit 4c1e8f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compiler/resolutionCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,9 @@ namespace ts {

function watchAffectingLocationsOfResolution(resolution: ResolutionWithFailedLookupLocations, addToResolutionsWithOnlyAffectingLocations: boolean) {
Debug.assert(!!resolution.refCount);
if (addToResolutionsWithOnlyAffectingLocations) resolutionsWithOnlyAffectingLocations.push(resolution);
const { affectingLocations } = resolution;
if (!affectingLocations.length) return;
if (addToResolutionsWithOnlyAffectingLocations) resolutionsWithOnlyAffectingLocations.push(resolution);
// Watch package json
for (const affectingLocation of affectingLocations) {
createFileWatcherOfAffectingLocation(affectingLocation);
Expand Down

0 comments on commit 4c1e8f2

Please sign in to comment.