Skip to content
Prev Previous commit
Next Next commit
Use isExternalModuleNameRelative instead of !pathIsBareSpecifier
  • Loading branch information
andrewbranch authored Jan 29, 2021
commit 248ed3728e7a4a035e91bc5ec67c4fcc50df5326
2 changes: 1 addition & 1 deletion src/services/goToDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ namespace ts.GoToDefinition {

if (sourceFile.resolvedModules?.size) {
const node = getTokenAtPosition(sourceFile, position);
if (isModuleSpecifierLike(node) && !pathIsBareSpecifier(node.text) && sourceFile.resolvedModules.has(node.text)) {
if (isModuleSpecifierLike(node) && isExternalModuleNameRelative(node.text) && sourceFile.resolvedModules.has(node.text)) {
const fileName = sourceFile.resolvedModules.get(node.text)?.resolvedFileName
Comment thread
andrewbranch marked this conversation as resolved.
Outdated
|| resolvePath(getDirectoryPath(sourceFile.fileName), node.text);
Comment thread
andrewbranch marked this conversation as resolved.
Outdated
return {
Expand Down