From da8416ebbee90d34088259ca62e73cede37d2f8d Mon Sep 17 00:00:00 2001 From: Collin Barrett Date: Fri, 21 Sep 2018 21:55:04 -0500 Subject: [PATCH] fix more null check bugs ref #505 --- .../modules/home/components/detailsExpander/infoCard/Tags.tsx | 2 +- .../detailsExpander/maintainersInfoCard/MaintainersInfoCard.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/Tags.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/Tags.tsx index ea808f9df..553e00a61 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/Tags.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/Tags.tsx @@ -7,7 +7,7 @@ interface IProps { } export const Tags = (props: IProps) => { - return props.tags.length > 0 + return props.tags && props.tags.length > 0 ?
{props.tags.map((t: IListTagDto, i: number) => )}
diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/maintainersInfoCard/MaintainersInfoCard.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/maintainersInfoCard/MaintainersInfoCard.tsx index c8e69d51c..33e7b77d6 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/maintainersInfoCard/MaintainersInfoCard.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/maintainersInfoCard/MaintainersInfoCard.tsx @@ -7,7 +7,7 @@ interface IProps { } export const MaintainersInfoCard = (props: IProps) => { - return props.maintainers.length > 0 + return props.maintainers && props.maintainers.length > 0 ?
{props.maintainers.map( (m: IListMaintainerDto, i: number) => )}