navigationBar: Avoid double recursion on special property assignment (#25077)
This commit is contained in:
parent
1c3259d29b
commit
f3e2e891da
2 changed files with 36 additions and 1 deletions
|
@ -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:
|
||||
|
|
35
tests/cases/fourslash/navbarNestedCommonJsExports.ts
Normal file
35
tests/cases/fourslash/navbarNestedCommonJsExports.ts
Normal file
|
@ -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" },
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
Loading…
Reference in a new issue