diff --git a/src/store/modules/product/actions.ts b/src/store/modules/product/actions.ts index 69eb1095..b16ad606 100644 --- a/src/store/modules/product/actions.ts +++ b/src/store/modules/product/actions.ts @@ -42,7 +42,7 @@ const actions: ActionTree = { 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);