Skip to content

Commit

Permalink
Fixed: When including a tag, the product count does not update if the…
Browse files Browse the repository at this point in the history
… tag does not contain any product logic(#2dmha76)
  • Loading branch information
shashwatbangar committed May 27, 2022
1 parent ded6c5f commit 966ca54
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/store/modules/product/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ const actions: ActionTree<ProductState, RootState> = {
totalVariant = state.products.total.variant
}
commit(types.PRODUCT_LIST_UPDATED, { products, totalVirtual, totalVariant });
} else if(query.json.query === "*:*") {
showToast(translate("Products not found"));
commit(types.PRODUCT_LIST_UPDATED, { products: [], totalVirtual: 0, totalVariant: 0 });
} else {
state.products.total.virtual = 0;
state.products.total.variant = 0;
showToast(translate("Products not found"));
commit(types.PRODUCT_LIST_UPDATED, { products: [], totalVirtual: state.products.total.virtual, totalVariant: state.products.total.variant });
}
Expand Down

0 comments on commit 966ca54

Please sign in to comment.