@revenexx/cover 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ export const useProductDetail = (id: MaybeRefOrGetter<string>) => {
21
21
  );
22
22
 
23
23
  const productInfo = computed<ProductDetailProduct | undefined>(
24
- () => detail.value?.product[0],
24
+ () => detail.value?.product?.[0],
25
25
  );
26
26
 
27
27
  const mainImages = computed<ProductDetailImage[]>(() =>
@@ -31,7 +31,7 @@ export const useProductDetail = (id: MaybeRefOrGetter<string>) => {
31
31
  );
32
32
 
33
33
  const longDescription = computed<string | undefined>(
34
- () => detail.value?.descriptions.find(d => d.type === "long")?.content,
34
+ () => detail.value?.descriptions?.find(d => d.type === "long")?.content,
35
35
  );
36
36
 
37
37
  const stocks = computed<ProductDetailStock[]>(
@@ -46,7 +46,7 @@ export const useProductDetail = (id: MaybeRefOrGetter<string>) => {
46
46
  () => detail.value?.prices ?? [],
47
47
  );
48
48
 
49
- const taxRate = computed<number>(() => detail.value?.tax.rate ?? 0);
49
+ const taxRate = computed<number>(() => detail.value?.tax?.rate ?? 0);
50
50
 
51
51
  const productCategories = computed<ProductDetailCategory[]>(
52
52
  () => detail.value?.categories ?? [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revenexx/cover",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Cover \u2014 revenexx design system for Nuxt. Distributed as a Nuxt layer: generic UI components, theming tokens and stores shared by the demo shop, custom storefronts and the Blokkli theme.",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",