mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
Merge pull request #12165 from HerrBertling/fix/11944-vue-types-for-real-sorry
Addon-docs: Fix Vue ArgsTable sanitizing of item.type.elements to item.type.value
This commit is contained in:
commit
800b73e33e
@ -34,7 +34,16 @@ export const extractComponentSectionArray = (docgenSection: any) => {
|
|||||||
const createPropDef = getPropDefFactory(typeSystem);
|
const createPropDef = getPropDefFactory(typeSystem);
|
||||||
|
|
||||||
return docgenSection.map((item: any) => {
|
return docgenSection.map((item: any) => {
|
||||||
const sanitizedItem = { ...item, value: item.elements };
|
let sanitizedItem = item;
|
||||||
|
if (item.type?.elements) {
|
||||||
|
sanitizedItem = {
|
||||||
|
...item,
|
||||||
|
type: {
|
||||||
|
...item.type,
|
||||||
|
value: item.type.elements,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
return extractProp(sanitizedItem.name, sanitizedItem, typeSystem, createPropDef);
|
return extractProp(sanitizedItem.name, sanitizedItem, typeSystem, createPropDef);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user