check if tag array has length in TagCloud

This commit is contained in:
Collin M. Barrett 2019-08-24 10:02:19 -05:00
parent 22d9bf3cb7
commit 089da5e7b8

View file

@ -12,7 +12,7 @@ interface Props {
};
export const TagCloud = (props: Props): JSX.Element | null => {
return props.tags
return props.tags && props.tags.length
? <div className={styles.grow}>
{props.tags.map((t: TagData, i: number) =>
<Tag key={i} title={t.description}>{t.name}</Tag>)}