@@ -356,7 +356,7 @@ namespace ts.FindAllReferences.Core {
356
356
357
357
/** Core find-all-references algorithm for a normal symbol. */
358
358
function getReferencedSymbolsForSymbol ( symbol : Symbol , node : Node , sourceFiles : ReadonlyArray < SourceFile > , checker : TypeChecker , cancellationToken : CancellationToken , options : Options ) : SymbolAndEntries [ ] {
359
- symbol = skipPastExportOrImportSpecifierOrUnion ( symbol , node , checker ) ;
359
+ symbol = skipPastExportOrImportSpecifierOrUnion ( symbol , node , checker ) || symbol ;
360
360
361
361
// Compute the meaning from the location and the symbol it references
362
362
const searchMeaning = getIntersectingMeaningFromDeclarations ( getMeaningFromLocation ( node ) , symbol . declarations ) ;
@@ -405,7 +405,7 @@ namespace ts.FindAllReferences.Core {
405
405
}
406
406
407
407
/** 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 {
409
409
const { parent } = node ;
410
410
if ( isExportSpecifier ( parent ) ) {
411
411
return getLocalSymbolForExportSpecifier ( node as Identifier , symbol , parent , checker ) ;
@@ -425,7 +425,7 @@ namespace ts.FindAllReferences.Core {
425
425
return isTypeLiteralNode ( decl . parent ) && isUnionTypeNode ( decl . parent . parent )
426
426
? checker . getPropertyOfType ( checker . getTypeFromTypeNode ( decl . parent . parent ) , symbol . name )
427
427
: undefined ;
428
- } ) || symbol ;
428
+ } ) ;
429
429
}
430
430
431
431
/**
0 commit comments