Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Fix missing FlowType enum values in prop description (#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.
- Loading branch information
1 parent
b03c207
commit 2c68067
Showing
2 changed files
with
26 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters