Skip to content

Commit 63b4076

Browse files
committed
Fix incorrect path matching when calculating module specifier
1 parent 3fd8a57 commit 63b4076

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/moduleSpecifiers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ namespace ts.moduleSpecifiers {
448448
startsWith(relativeToBaseUrl, prefix) &&
449449
endsWith(relativeToBaseUrl, suffix) ||
450450
!suffix && relativeToBaseUrl === removeTrailingDirectorySeparator(prefix)) {
451-
const matchedStar = relativeToBaseUrl.substr(prefix.length, relativeToBaseUrl.length - suffix.length);
451+
const matchedStar = relativeToBaseUrl.substr(prefix.length, relativeToBaseUrl.length - suffix.length - prefix.length);
452452
return key.replace("*", matchedStar);
453453
}
454454
}

0 commit comments

Comments
 (0)