mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Fix auto import path mapping when first pattern fails (#54868)
This commit is contained in:
@@ -775,7 +775,9 @@ function tryGetModuleNameFromPaths(relativeToBaseUrl: string, paths: MapLike<rea
|
||||
validateEnding({ ending, value })
|
||||
) {
|
||||
const matchedStar = value.substring(prefix.length, value.length - suffix.length);
|
||||
return pathIsRelative(matchedStar) ? undefined : key.replace("*", matchedStar);
|
||||
if (!pathIsRelative(matchedStar)) {
|
||||
return key.replace("*", matchedStar);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user