Skip to content

Commit 2353695

Browse files
committed
Update ProductsShowAll.vue
1 parent 3652ad6 commit 2353695

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

components/Products/ProductsShowAll.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ import ProductPrice from "@/components/Products/ProductPrice.vue";
3333
const props = defineProps({
3434
categoryId: { type: String, required: false },
3535
categorySlug: { type: String, required: false },
36-
products: {
37-
type: Array,
38-
required: true,
39-
default: () => [],
40-
},
4136
});
4237
4338
const config = useRuntimeConfig();
4439
45-
const products = computed(() => props.products);
40+
const products = computed(() => {
41+
return (
42+
allCategoryProducts.value?.productCategory?.products?.nodes ||
43+
allProducts.value?.products?.nodes ||
44+
[]
45+
);
46+
});
4647
4748
/**
4849
* Returns the path and query parameters for a product link.

0 commit comments

Comments
 (0)