Skip to content

Commit 7afee8c

Browse files
author
Andy Hanson
committed
Fix formatting
1 parent cc4a3a8 commit 7afee8c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/services/goToDefinition.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,14 @@ namespace ts.GoToDefinition {
199199
}
200200

201201
function tryAddSignature(signatureDeclarations: Declaration[] | undefined, selectConstructors: boolean, symbolKind: string, symbolName: string, containerName: string, result: DefinitionInfo[]) {
202+
if (!signatureDeclarations) {
203+
return false;
204+
}
205+
202206
const declarations: Declaration[] = [];
203207
let definition: Declaration | undefined;
204208

205-
if (signatureDeclarations) for (const d of signatureDeclarations) {
209+
for (const d of signatureDeclarations) {
206210
if (selectConstructors ? d.kind === SyntaxKind.Constructor : isSignatureDeclaration(d)) {
207211
declarations.push(d);
208212
if ((<FunctionLikeDeclaration>d).body) definition = d;

0 commit comments

Comments
 (0)