Fix namespace with the same name conflicting in the tree navigation (#4136)
fix #4130
This commit is contained in:
Родитель
04d5004546
Коммит
aaa03cae23
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
|
||||
changeKind: fix
|
||||
packages:
|
||||
- "@typespec/html-program-viewer"
|
||||
---
|
||||
|
||||
Fix namespace with the same name conflicting in the tree navigation
|
|
@ -109,7 +109,8 @@ function computeTree(program: Program): TypeGraphListNode {
|
|||
}
|
||||
|
||||
function computeTypeNode(parentPath: string, type: NamedType, name?: string): TypeGraphTypeNode {
|
||||
const path = parentPath + "." + type.name.toString();
|
||||
const pathSeg = name ?? type.name.toString();
|
||||
const path = parentPath + "." + pathSeg;
|
||||
return computeTypeNodeProps(path, type, name);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче