From 62dedfe340ec638f15b1e7026e6797cd84c83b2e Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Thu, 20 Jun 2024 16:52:51 +0530 Subject: [PATCH] Improved: logic for using cached facility info in case facility additional information is available (#271) --- src/store/modules/facility/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/modules/facility/actions.ts b/src/store/modules/facility/actions.ts index 8ac4f410..4c419970 100644 --- a/src/store/modules/facility/actions.ts +++ b/src/store/modules/facility/actions.ts @@ -183,7 +183,7 @@ const actions: ActionTree = { // checking that if the list contains basic information for facility then not fetching the same information again const cachedFacilities = JSON.parse(JSON.stringify(state.facilities.list)) const current = cachedFacilities.find((facility: any) => facility.facilityId === payload.facilityId) - if(current?.facilityId && !payload.skipState) { + if(current?.facilityId && !payload.skipState && current["groupInformation"]) { // As inventory channels are fetched while fetching additional facility info // But here we already have additional facility info, so just getting and adding inventory groups to current. const inventoryGroups = rootGetters['util/getInventoryGroups'];