From 64a5b9629926584ae475f4d1b7ddffc46801abe1 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Mon, 3 Jun 2024 10:18:33 +0530 Subject: [PATCH] Improved: validation for updation of product store settings(#15) --- src/views/ProductStoreDetails.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/ProductStoreDetails.vue b/src/views/ProductStoreDetails.vue index ebc85a7..fa098e1 100644 --- a/src/views/ProductStoreDetails.vue +++ b/src/views/ProductStoreDetails.vue @@ -560,7 +560,7 @@ async function updateProductStoreDetail(event: any, fieldName: string, isToggle: event.stopImmediatePropagation(); payload = {[fieldName]: productStore.value[fieldName] === 'Y' ? 'N' : 'Y' }; } else { - if(event.target.value.trim() === productStore.value[fieldName]) return; + if((!productStore.value[fieldName] && !event.target.value.trim()) || (productStore.value[fieldName] && productStore.value[fieldName] === event.target.value.trim())) return; payload = { [fieldName]: event.target.value }; }