From 1fbcd44548a8fdfb7e732679efe8cbbc20036444 Mon Sep 17 00:00:00 2001 From: v-rocheleau Date: Tue, 5 Sep 2023 21:17:11 +0000 Subject: [PATCH] fix fetchDatasetDataTypesSummariesIfPossible skip condition --- src/modules/datasets/actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/datasets/actions.js b/src/modules/datasets/actions.js index 947d56b1f..21b36ef11 100644 --- a/src/modules/datasets/actions.js +++ b/src/modules/datasets/actions.js @@ -12,7 +12,7 @@ const fetchDatasetDataTypesSummary = networkAction((serviceInfo, datasetID) => ( })); export const fetchDatasetDataTypesSummariesIfPossible = (datasetID) => async (dispatch, getState) => { - if (getState().datasetDataTypes.isFetchingAll) return; + if (getState().datasetDataTypes.itemsById?.[datasetID]?.isFetching) return; await Promise.all( getDataServices(getState()).map(serviceInfo => dispatch(fetchDatasetDataTypesSummary(serviceInfo, datasetID))), );