Merge pull request #38415 from Kingwl/navTree-fix
Fix trancked es5 classes after new scope
This commit is contained in:
commit
324d292e3d
2 changed files with 24 additions and 0 deletions
|
@ -163,6 +163,7 @@ namespace ts.NavigationBar {
|
|||
// Save the old parent
|
||||
parentsStack.push(parent);
|
||||
trackedEs5ClassesStack.push(trackedEs5Classes);
|
||||
trackedEs5Classes = undefined;
|
||||
parent = navNode;
|
||||
}
|
||||
|
||||
|
|
23
tests/cases/fourslash/navigationBarWithLocalVariables.ts
Normal file
23
tests/cases/fourslash/navigationBarWithLocalVariables.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
//// function x(){
|
||||
//// const x = Object()
|
||||
//// x.foo = ""
|
||||
//// }
|
||||
|
||||
verify.navigationTree({
|
||||
"text": "<global>",
|
||||
"kind": "script",
|
||||
"childItems": [
|
||||
{
|
||||
"text": "x",
|
||||
"kind": "function",
|
||||
"childItems": [
|
||||
{
|
||||
"text": "x",
|
||||
"kind": "const"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
Loading…
Reference in a new issue