Skip to content

Commit a5bb13f

Browse files
author
zhengbli
committed
fix broken tests
1 parent 057357b commit a5bb13f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/services/services.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -4918,17 +4918,19 @@ namespace ts {
49184918
// there documentation comments might be attached to the right hand side symbol of their declarations.
49194919
// The pattern of such special property access is that the parent symbol is the symbol of the file.
49204920
if (symbol.parent && forEach(symbol.parent.declarations, declaration => declaration.kind === SyntaxKind.SourceFile)) {
4921-
for(const declaration of symbol.declarations) {
4921+
for (const declaration of symbol.declarations) {
49224922
if (!declaration.parent || declaration.parent.kind !== SyntaxKind.BinaryExpression) {
49234923
continue;
49244924
}
49254925

49264926
const rhsSymbol = program.getTypeChecker().getSymbolAtLocation((<BinaryExpression>declaration.parent).right);
4927-
if (rhsSymbol) {
4928-
documentation = rhsSymbol.getDocumentationComment();
4929-
if (documentation.length > 0) {
4930-
return;
4931-
}
4927+
if (!rhsSymbol) {
4928+
continue;
4929+
}
4930+
4931+
documentation = rhsSymbol.getDocumentationComment();
4932+
if (documentation.length > 0) {
4933+
break;
49324934
}
49334935
}
49344936
}

0 commit comments

Comments
 (0)