From c66d6b4c9790d89045956dbca885e795c6676cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaume=20Sol=C3=ADs?= Date: Thu, 18 Apr 2024 15:37:31 +0200 Subject: [PATCH] ajustes cart --- src/stores/cart.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/cart.js b/src/stores/cart.js index 046bb46..e831fc4 100644 --- a/src/stores/cart.js +++ b/src/stores/cart.js @@ -194,7 +194,7 @@ export const useCartStore = defineStore("cart", () => { const params = transformOptionsToParams( 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); const hasCurrentProduct = computed(() => { @@ -202,7 +202,7 @@ export const useCartStore = defineStore("cart", () => { }); //if (isEmpty.value) { - if (correctProduct.length === 0) { + if (correctProduct.data.length === 0) { push("/"); return quasarNotify({ message: