Skip to content

Commit b64eefd

Browse files
committed
Remove redundant null check
1 parent 9c2b95d commit b64eefd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/findAllReferences.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ namespace ts.FindAllReferences.Core {
405405
}
406406

407407
/** Handle a few special cases relating to export/import specifiers. */
408-
function skipPastExportOrImportSpecifierOrUnion(symbol: Symbol, node: Node, checker: TypeChecker): Symbol {
408+
function skipPastExportOrImportSpecifierOrUnion(symbol: Symbol, node: Node, checker: TypeChecker): Symbol | undefined {
409409
const { parent } = node;
410410
if (isExportSpecifier(parent)) {
411411
return getLocalSymbolForExportSpecifier(node as Identifier, symbol, parent, checker);
@@ -425,7 +425,7 @@ namespace ts.FindAllReferences.Core {
425425
return isTypeLiteralNode(decl.parent) && isUnionTypeNode(decl.parent.parent)
426426
? checker.getPropertyOfType(checker.getTypeFromTypeNode(decl.parent.parent), symbol.name)
427427
: undefined;
428-
}) || symbol;
428+
});
429429
}
430430

431431
/**

0 commit comments

Comments
 (0)