Skip to content

Commit 34988fd

Browse files
TypeScript Botweswigham
TypeScript Bot
andauthored
Cherry-pick PR #46209 into release-4.4 (#46230)
Component commits: 2286798 Limit package.json realpath lookup to only successful resolutions Co-authored-by: Wesley Wigham <[email protected]>
1 parent bbb31bb commit 34988fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/tsbuildPublic.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ namespace ts {
873873
);
874874
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && map(
875875
state.moduleResolutionCache.getPackageJsonInfoCache().entries(),
876-
([path, data]) => ([state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data] as const)
876+
([path, data]) => ([state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data] as const)
877877
));
878878

879879
if (state.watch) {

0 commit comments

Comments
 (0)