making sure images exist

This commit is contained in:
Tiago Vasconcelos 2023-04-03 22:15:38 +01:00
parent 2ecfc4f33b
commit e869270ddd
2 changed files with 2 additions and 3 deletions

View file

@ -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"

View file

@ -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"