diff --git a/src/app/components/generator/McdocRenderer.tsx b/src/app/components/generator/McdocRenderer.tsx
index 6e3f3365..f2b9629f 100644
--- a/src/app/components/generator/McdocRenderer.tsx
+++ b/src/app/components/generator/McdocRenderer.tsx
@@ -26,7 +26,7 @@ export function McdocRoot({ node, makeEdit, ctx } : Props) {
const { locale } = useLocale()
const type = node?.typeDef ?? { kind: 'unsafe' }
- if (type.kind === 'struct' && JsonObjectNode.is(node)) {
+ if (type.kind === 'struct' && type.fields.length > 0 && JsonObjectNode.is(node)) {
return
+
})}
>
@@ -513,7 +507,7 @@ function ListBody({ type: outerType, node, makeEdit, ctx }: ListBodyProps) {
{node.children.map((item, index) => {
const child = item.value
const itemType = getItemType(type)
- const simplifiedItemType = simplifyType(itemType, ctx)
+ const childType = simplifyType(itemType, ctx)
const makeItemEdit: MakeEdit = (edit) => {
makeEdit(() => {
const newChild = edit(child?.range ?? item.range)
@@ -540,9 +534,9 @@ function ListBody({ type: outerType, node, makeEdit, ctx }: ListBodyProps) {
}
+
-
+
})} > @@ -556,10 +550,10 @@ function TupleBody({ type, node, makeEdit, ctx }: TupleBodyProps) { return <>> } return <> - {type.items.map((item, index) => { - const itemNode = node?.children?.[index] - const child = itemNode?.value - const itemType = simplifyType(item, ctx) + {type.items.map((itemType, index) => { + const item = node?.children?.[index] + const child = item?.value + const childType = simplifyType(itemType, ctx) const makeItemEdit: MakeEdit = (edit) => { makeEdit(() => { const newChild = edit(child?.range ?? node.range) @@ -578,9 +572,9 @@ function TupleBody({ type, node, makeEdit, ctx }: TupleBodyProps) {
+
-
+
})} >