diff --git a/components/widgets/forest-change/tree-cover-gain-outside-plantations/index.js b/components/widgets/forest-change/tree-cover-gain-outside-plantations/index.js index b2449969e7..40464e6459 100644 --- a/components/widgets/forest-change/tree-cover-gain-outside-plantations/index.js +++ b/components/widgets/forest-change/tree-cover-gain-outside-plantations/index.js @@ -96,6 +96,8 @@ export default { return getTreeCoverGainByPlantationType(params).then((response) => { const { data } = (response && response.data) || {}; + if (data?.length === 0) return null; + const totalArea = data.reduce( (prev, curr) => prev + curr?.gain_area_ha, 0