Skip to content

Commit 167b252

Browse files
committed
🐛 Fix empty accordion in forged block with preprocessing
1 parent dfe98a1 commit 167b252

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/builder/src/features/forge/components/zodLayouts/ZodObjectLayout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ export const ZodObjectLayout = ({
116116

117117
const getObjectKeysWithSameAccordionAttr = (accordion: string, shape: any) =>
118118
Object.keys(shape).reduce<string[]>((keys, currentKey) => {
119-
const l = shape[currentKey]._def.layout as
119+
const innerSchema = getZodInnerSchema(shape[currentKey]);
120+
const l = innerSchema._def.layout as
120121
| ZodLayoutMetadata<ZodTypeAny>
121122
| undefined;
122123
return !l?.accordion || l.accordion !== accordion

0 commit comments

Comments
 (0)