From 72e2e4ba67a3a3fdc2fa0c6ed83ca586d9f91ff6 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Thu, 26 Dec 2024 15:39:22 +0530 Subject: [PATCH] Fixed: undefined error when closing matchproduct modal without selecting, and Converting inputCount to number for unmatched (#528) --- src/views/HardCountDetail.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/HardCountDetail.vue b/src/views/HardCountDetail.vue index 70d0ce11..ef8b17b4 100644 --- a/src/views/HardCountDetail.vue +++ b/src/views/HardCountDetail.vue @@ -566,7 +566,7 @@ async function saveCount(currentProduct: any, isScrollEvent = false) { item.countedByUserLoginId = userProfile.value.username if(selectedCountUpdateType.value === "replace") item.scannedCount = inputCount.value - else item.scannedCount = inputCount.value + prevCount + else item.scannedCount = Number(inputCount.value) + Number(prevCount) currentItem = item; } }) @@ -621,7 +621,7 @@ async function matchProduct(currentProduct: any) { }); addProductModal.onDidDismiss().then(async (result) => { - if(result.data.selectedProduct) { + if(result.data?.selectedProduct) { const product = result.data.selectedProduct const newItem = await addProductToCount(product.productId) updateCurrentItemInList(newItem, currentProduct.scannedId);