Skip to content

Commit

Permalink
Fixed: error showing in case of empty product while tab switch
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Oct 10, 2024
1 parent 306e69c commit 62f5872
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/CountDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@
</aside>
<!--Product details-->
<main class="main">
<div class="product" @scroll="onScroll">
<div class="product" @scroll="onScroll" v-if="filteredItems.length">
<div class="image ion-padding-top" v-for="item in filteredItems" :key="item.importItemSeqId" :data-product-id="item.productId" :data-seq="item.importItemSeqId" :id="`${item.productId}-${item.importItemSeqId}`">
<Image :src="getProduct(item.productId)?.mainImageUrl" />
</div>
</div>
<div class="detail">
<div class="detail" v-if="Object.keys(product)?.length">
<ion-item lines="none">
<ion-label class="ion-text-wrap">
<h1>{{ getProductIdentificationValue(productStoreSettings["productIdentificationPref"].primaryId, getProduct(product.productId)) }}</h1>
Expand Down Expand Up @@ -348,7 +348,7 @@ function updateFilteredItems() {
store.dispatch("product/currentProduct", product.value);
updateNavigationState(filteredItems.value.indexOf(product.value));
} else {
store.dispatch("product/currentProduct", null);
store.dispatch("product/currentProduct", {});
isFirstItem.value = true
isLastItem.value = false
}
Expand Down

0 comments on commit 62f5872

Please sign in to comment.