Skip to content

Commit 324d292

Browse files
authored
Merge pull request microsoft#38415 from Kingwl/navTree-fix
Fix trancked es5 classes after new scope
2 parents ff36bf0 + 6f4deae commit 324d292

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/services/navigationBar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ namespace ts.NavigationBar {
163163
// Save the old parent
164164
parentsStack.push(parent);
165165
trackedEs5ClassesStack.push(trackedEs5Classes);
166+
trackedEs5Classes = undefined;
166167
parent = navNode;
167168
}
168169

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/// <reference path="fourslash.ts"/>
2+
3+
//// function x(){
4+
//// const x = Object()
5+
//// x.foo = ""
6+
//// }
7+
8+
verify.navigationTree({
9+
"text": "<global>",
10+
"kind": "script",
11+
"childItems": [
12+
{
13+
"text": "x",
14+
"kind": "function",
15+
"childItems": [
16+
{
17+
"text": "x",
18+
"kind": "const"
19+
}
20+
]
21+
}
22+
]
23+
});

0 commit comments

Comments
 (0)