React inlining: Make sure some props object always exists
This commit is contained in:
@@ -67,7 +67,7 @@ export default function ({ types: t }) {
|
||||
if (props.properties.length) {
|
||||
props = t.callExpression(file.addHelper("defaultProps"), [defProps, props]);
|
||||
} else {
|
||||
props = defProps;
|
||||
props = t.logicalExpression("||", defProps, props);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user