Skip to content

Commit 5ba75a9

Browse files
committedAug 29, 2021
fix(website): do not try to run dedent when help text is undefined
1 parent 06be027 commit 5ba75a9

File tree

1 file changed

+9
-5
lines changed
  • website/src/components/controls

1 file changed

+9
-5
lines changed
 

‎website/src/components/controls/Help.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ export const Container = styled.div`
1717
}
1818
`
1919

20-
export const Help = ({ children }) => (
21-
<Container>
22-
<Markdown source={dedent(children)} />
23-
</Container>
24-
)
20+
export const Help = ({ children }) => {
21+
if (!children) return null
22+
23+
return (
24+
<Container>
25+
<Markdown source={dedent(children)} />
26+
</Container>
27+
)
28+
}

0 commit comments

Comments
 (0)
Please sign in to comment.