making sure images exist
This commit is contained in:
parent
2ecfc4f33b
commit
e869270ddd
2 changed files with 2 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
<q-card class="card--product">
|
<q-card class="card--product">
|
||||||
<q-img
|
<q-img
|
||||||
:src="product.images.length > 0 ? product.images[0] : '/nostrmarket/static/images/placeholder.png'"
|
:src="(product.images && product.images.length > 0 && product.images[0]) ? product.images[0] : '/nostrmarket/static/images/placeholder.png'"
|
||||||
alt="Product Image"
|
alt="Product Image"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
spinner-color="white"
|
spinner-color="white"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
<div class="row q-mt-sm">
|
<div class="row q-mt-sm">
|
||||||
<div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
|
<div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
|
||||||
<div class="q-pa-md">
|
<div class="q-pa-md" v-if="product.images && product.images[0]">
|
||||||
<q-carousel
|
<q-carousel
|
||||||
v-if="product.images"
|
|
||||||
swipeable
|
swipeable
|
||||||
animated
|
animated
|
||||||
v-model="slide"
|
v-model="slide"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue