Skip to content

Commit

Permalink
Merge pull request #12158 from HerrBertling/fix/11944-docs-union-type…
Browse files Browse the repository at this point in the history
…s-vue

Addon-docs: Fix ArgsTable union type handling in Vue/TS
  • Loading branch information
shilman authored Aug 20, 2020
2 parents ff5f480 + c4f70ca commit 7e30368
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions addons/docs/src/lib/docgen/extractDocgenProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ export const extractComponentSectionArray = (docgenSection: any) => {
const typeSystem = getTypeSystem(docgenSection[0]);
const createPropDef = getPropDefFactory(typeSystem);

return docgenSection
.map((item: any) => extractProp(item.name, item, typeSystem, createPropDef))
.filter(Boolean);
return docgenSection.map((item: any) => {
const sanitizedItem = { ...item, value: item.elements };
return extractProp(sanitizedItem.name, sanitizedItem, typeSystem, createPropDef);
});
};

export const extractComponentSectionObject = (docgenSection: any) => {
Expand Down

0 comments on commit 7e30368

Please sign in to comment.