You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Fix missing FlowType enum values in prop description (styleguidist#1571)
In `ef4c109b`, the file `PropsRenderer.js` (located at
`src/client/rsg-components/Props/PropsRenderer.js`) was removed. In
`PropsRenderer.js`, the `renderExtra` method checked whether `getType`
for the argument to `renderExtra` was present:
```es6
function renderExtra(prop) {
const type = getType(prop);
if (!type) {
return null;
}
...
}
```
However, in `ef4c109b`, this method was replaced with `renderExtra.tsx`
and the condition was changed to:
```typescript
export default function renderExtra(prop: PropDescriptorWithFlow): React.ReactNode {
const type = getType(prop);
if (!prop.type || !type) {
return null;
}
```
Unfortunately, this extra condition has resulted in this method always
returning `null` for a Flow typed prop as `prop.type` is always `null`
as `prop.type` is never set.
This commit reverts the condition to what it was before the migration to
TypeScript.
0 commit comments