File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -650,7 +650,10 @@ namespace ts.NavigationBar {
650650 // We use 1 NavNode to represent 'A.B.C', but there are multiple source nodes.
651651 // Only merge module nodes that have the same chain. Don't merge 'A.B.C' with 'A'!
652652 function areSameModule ( a : ModuleDeclaration , b : ModuleDeclaration ) : boolean {
653- return a . body ! . kind === b . body ! . kind && ( a . body ! . kind !== SyntaxKind . ModuleDeclaration || areSameModule ( a . body as ModuleDeclaration , b . body as ModuleDeclaration ) ) ;
653+ if ( ! a . body || ! b . body ) {
654+ return a . body === b . body ;
655+ }
656+ return a . body . kind === b . body . kind && ( a . body . kind !== SyntaxKind . ModuleDeclaration || areSameModule ( a . body as ModuleDeclaration , b . body as ModuleDeclaration ) ) ;
654657 }
655658
656659 /** Merge source into target. Source should be thrown away after this is called. */
You can’t perform that action at this time.
0 commit comments