Skip to content

Commit c31e17c

Browse files
committed
Fix extract-meta and tsx default function props.
1 parent cbe5bbe commit c31e17c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dash/extract-meta.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,14 @@ function gatherComponents(sources, components = {}) {
727727
let props;
728728

729729
if (propsType) {
730+
if (
731+
propsType.valueDeclaration &&
732+
propsType.valueDeclaration.name &&
733+
propsType.valueDeclaration.name.elements &&
734+
propsType.valueDeclaration.name.elements.length
735+
) {
736+
defaultProps = getDefaultPropsValues(propsType.valueDeclaration.name.elements);
737+
}
730738
props = getPropInfo(propsType, defaultProps);
731739
} else {
732740
defaultProps = getDefaultPropsForClassComponent(type, source);

0 commit comments

Comments
 (0)