Skip to content

Commit

Permalink
Fixed: undefined error when closing matchproduct modal without select…
Browse files Browse the repository at this point in the history
…ing, and Converting inputCount to number for unmatched (#528)
  • Loading branch information
amansinghbais committed Dec 26, 2024
1 parent 49551e2 commit 72e2e4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/HardCountDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
})
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 72e2e4b

Please sign in to comment.