mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
Fix bug: getTouchingPropertyName does not return undefined, but it may return the source file node
This commit is contained in:
parent
cf749307b9
commit
a1cc88b080
@ -4645,7 +4645,7 @@ namespace ts {
|
||||
|
||||
const sourceFile = getValidSourceFile(fileName);
|
||||
const node = getTouchingPropertyName(sourceFile, position);
|
||||
if (!node) {
|
||||
if (node === sourceFile) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
9
tests/cases/fourslash/hoverOverComment.ts
Normal file
9
tests/cases/fourslash/hoverOverComment.ts
Normal file
@ -0,0 +1,9 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////export function f() {}
|
||||
//////foo
|
||||
/////**///moo
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoIs("");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user