From 59bd8f6b800842f40a8756f32257fd8daa29303d Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Tue, 1 Aug 2023 19:11:55 +0530 Subject: [PATCH] Fixed: issue of stores not being searched even when entering a valid zipCode --- src/views/PickupLocationModal.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/PickupLocationModal.vue b/src/views/PickupLocationModal.vue index 880164f..07efbb4 100644 --- a/src/views/PickupLocationModal.vue +++ b/src/views/PickupLocationModal.vue @@ -130,7 +130,7 @@ export default defineComponent({ try { const storeLookupResp = await FacilityService.getStores(payload) - if (!storeLookupResp.data.response.numFound) return []; + if (!storeLookupResp.data.response?.numFound) return []; return storeLookupResp.data.response.docs } catch (error) { console.error(error) @@ -145,7 +145,7 @@ export default defineComponent({ } }) - if (!locationResp.response) return ''; + if (!locationResp.data.response?.numFound) return ''; return locationResp.data.response.docs[0].location } catch (error) { console.error(error)