Skip to content

Commit

Permalink
Merge pull request #98 from shashwatbangar/#2dmha76
Browse files Browse the repository at this point in the history
Fixed: When including a tag, the product count does not update if the tag does not contain any product(#2dmha76)
  • Loading branch information
adityasharma7 authored May 27, 2022
2 parents 5e3de37 + 6ab8de4 commit 12edaa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/modules/product/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const actions: ActionTree<ProductState, RootState> = {
commit(types.PRODUCT_LIST_UPDATED, { products, totalVirtual, totalVariant });
} else {
showToast(translate("Products not found"));
commit(types.PRODUCT_LIST_UPDATED, { products: [], totalVirtual: state.products.total.virtual, totalVariant: state.products.total.variant });
commit(types.PRODUCT_LIST_UPDATED, { products: [], totalVirtual: query.json.query === "*:*" ? 0 : state.products.total.virtual, totalVariant: query.json.query === "*:*" ? 0 : state.products.total.variant });
}
} catch (error) {
console.error(error);
Expand Down

0 comments on commit 12edaa1

Please sign in to comment.