Fix bug: getTouchingPropertyName does not return undefined, but it may return the source file node

This commit is contained in:
Andy Hanson
2016-05-13 14:44:15 -07:00
parent cf749307b9
commit a1cc88b080
2 changed files with 10 additions and 1 deletions

View File

@@ -4645,7 +4645,7 @@ namespace ts {
const sourceFile = getValidSourceFile(fileName);
const node = getTouchingPropertyName(sourceFile, position);
if (!node) {
if (node === sourceFile) {
return undefined;
}