fix more null check bugs

ref #505
This commit is contained in:
Collin Barrett 2018-09-21 21:55:04 -05:00
parent af9828e721
commit da8416ebbe
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ interface IProps {
}
export const Tags = (props: IProps) => {
return props.tags.length > 0
return props.tags && props.tags.length > 0
? <div className="d-md-none">
{props.tags.map((t: IListTagDto, i: number) => <Tag {...t} key={i}/>)}
</div>

View file

@ -7,7 +7,7 @@ interface IProps {
}
export const MaintainersInfoCard = (props: IProps) => {
return props.maintainers.length > 0
return props.maintainers && props.maintainers.length > 0
? <div className="w-100">
{props.maintainers.map(
(m: IListMaintainerDto, i: number) => <MaintainerInfoCard {...m} key={i}/>)}