File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -650,7 +650,10 @@ namespace ts.NavigationBar {
650
650
// We use 1 NavNode to represent 'A.B.C', but there are multiple source nodes.
651
651
// Only merge module nodes that have the same chain. Don't merge 'A.B.C' with 'A'!
652
652
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 ) ) ;
654
657
}
655
658
656
659
/** 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