From 5473236ed4815fbac5158bbf8dabfa5b5f2a5545 Mon Sep 17 00:00:00 2001 From: Brenda Sukh Date: Wed, 21 Oct 2020 15:40:11 -0400 Subject: [PATCH] Make sure hasCostsWithinTimeframe is a boolean --- .../src/components/ProductInsightsCard/ProductInsightsCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx b/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx index c9790a5bfa..13bb990740 100644 --- a/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx +++ b/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx @@ -51,7 +51,7 @@ const ProductInsightsCard = ({ product }: ProductInsightsCardProps) => { const dispatchLoadingProduct = useCallback(dispatchLoading, [product.kind]); const amount = resource?.entities?.length || 0; - const hasCostsWithinTimeframe = resource?.change && amount; + const hasCostsWithinTimeframe = resource?.change && !!amount; const subheader = amount ? `${amount} ${pluralOf(amount, 'entity', 'entities')}, sorted by cost`