mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 12:03:44 -05:00
fix(59825): getNavigationTree crash on invalid class merge and function merge with expando members (#60152)
This commit is contained in:
@@ -760,6 +760,7 @@ function isSynthesized(node: Node) {
|
||||
// We want to merge own children like `I` in in `module A { interface I {} } module A { interface I {} }`
|
||||
// We don't want to merge unrelated children like `m` in `const o = { a: { m() {} }, b: { m() {} } };`
|
||||
function isOwnChild(n: Node, parent: NavigationBarNode): boolean {
|
||||
if (n.parent === undefined) return false;
|
||||
const par = isModuleBlock(n.parent) ? n.parent.parent : n.parent;
|
||||
return par === parent.node || contains(parent.additionalNodes, par);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user