ajustes cart

This commit is contained in:
Jaume Solís 2024-04-18 15:37:31 +02:00
parent 08fb7fa2e2
commit c66d6b4c97
1 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ export const useCartStore = defineStore("cart", () => {
const params = transformOptionsToParams( const params = transformOptionsToParams(
availabilityForm.value || availability.value availabilityForm.value || availability.value
); );
const { correctProduct: { data }, } = await apiBack.get(`products/${product.id}`, { params }); const correctProduct = await apiBack.get(`products/${product.id}`, { params });
//await getProducts(params); //await getProducts(params);
const hasCurrentProduct = computed(() => { const hasCurrentProduct = computed(() => {
@ -202,7 +202,7 @@ export const useCartStore = defineStore("cart", () => {
}); });
//if (isEmpty.value) { //if (isEmpty.value) {
if (correctProduct.length === 0) { if (correctProduct.data.length === 0) {
push("/"); push("/");
return quasarNotify({ return quasarNotify({
message: message: