navigationBar: Avoid double recursion on special property assignment (#25077)

This commit is contained in:
Andy
2018-06-20 12:57:34 -07:00
committed by GitHub
parent 1c3259d29b
commit f3e2e891da
2 changed files with 36 additions and 1 deletions
+1 -1
View File
@@ -277,7 +277,7 @@ namespace ts.NavigationBar {
case SpecialPropertyAssignmentKind.PrototypeProperty:
case SpecialPropertyAssignmentKind.Prototype:
addNodeWithRecursiveChild(node, (node as BinaryExpression).right);
break;
return;
case SpecialPropertyAssignmentKind.ThisProperty:
case SpecialPropertyAssignmentKind.Property:
case SpecialPropertyAssignmentKind.None:
@@ -0,0 +1,35 @@
/// <reference path="fourslash.ts" />
// @allowJs: true
// @Filename: /a.js
////exports.a = exports.b = exports.c = 0;
verify.navigationTree({
text: "<global>",
kind: "script",
childItems: [
{
text: "a",
kind: "const",
childItems: [
{
text: "b",
kind: "const",
childItems: [{ text: "c", kind: "const" }],
},
],
},
],
});
verify.navigationBar([
{
text: "<global>",
kind: "script",
childItems: [
{ text: "a", kind: "const" },
],
},
]);