Merge pull request #34631 from amcasey/ComputedPropName

Handle undefined from getPropertyNameForPropertyNameNode
This commit is contained in:
Andrew Casey authored and GitHub committed 2019-10-22 10:17:05 -07:00
commit 159b6262ea
2 files changed
+59 -1

No files matched your search

+2 -1
View File
@@ -648,7 +648,8 @@ namespace ts.NavigationBar {
const declName = getNameOfDeclaration(<Declaration>node);
if (declName && isPropertyName(declName)) {
return unescapeLeadingUnderscores(getPropertyNameForPropertyNameNode(declName)!); // TODO: GH#18217
const propertyName = getPropertyNameForPropertyNameNode(declName);
return propertyName && unescapeLeadingUnderscores(propertyName);
}
switch (node.kind) {
case SyntaxKind.FunctionExpression: