Skip to content

Commit

Permalink
fix: show ProductCard, PriceCard & ProofCard only if object. Avoids e…
Browse files Browse the repository at this point in the history
…rrors
  • Loading branch information
raphodn committed Sep 7, 2024
1 parent 0b75dcd commit 42d4cb5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/PriceCard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-card :id="'price_' + price.id" data-name="price-card">
<v-card v-if="price" :id="'price_' + price.id" data-name="price-card">
<v-container class="pa-2">
<v-row>
<v-col v-if="!hideProductImage" class="pr-0" style="max-width:20%;">
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProductCard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-card :id="'product_' + product.code" data-name="product-card">
<v-card v-if="product" :id="'product_' + product.code" data-name="product-card">
<v-container class="pa-2" :style="latestPrice ? 'position:relative;' : ''">
<v-row v-if="product">
<v-col class="pr-0" style="max-width:20%">
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProofCard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-card :id="'proof_' + proof.id" data-name="proof-card" @click="selectProof">
<v-card v-if="proof" :id="'proof_' + proof.id" data-name="proof-card" @click="selectProof">
<v-card-title v-if="!hideProofHeader">
{{ $t('Common.Proof') }} <v-btn style="float:right;" variant="text" density="compact" icon="mdi-close" @click="close" />
</v-card-title>
Expand Down
2 changes: 1 addition & 1 deletion src/views/PriceDetail.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<v-row>
<v-col cols="12" sm="6">
<PriceCard v-if="price" :price="price" :product="price.product" />
<PriceCard :price="price" :product="price.product" />
</v-col>
</v-row>
</template>
Expand Down

0 comments on commit 42d4cb5

Please sign in to comment.