navigationBar: Fix bug for shorthand ambient module (#25992)

This commit is contained in:
Andy
2018-07-26 17:27:12 -07:00
committed by GitHub
parent af3f737451
commit 3bfe91cdd8
2 changed files with 19 additions and 4 deletions

View File

@@ -612,7 +612,7 @@ namespace ts.NavigationBar {
* We store 'A' as associated with a NavNode, and use getModuleName to traverse down again.
*/
function getInteriorModule(decl: ModuleDeclaration): ModuleDeclaration {
return decl.body!.kind === SyntaxKind.ModuleDeclaration ? getInteriorModule(<ModuleDeclaration>decl.body) : decl; // TODO: GH#18217
return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl;
}
function isComputedProperty(member: EnumMember): boolean {