diff --git a/components/diy/carousel.vue b/components/diy/carousel.vue index 65c167b4..00b7ffe1 100644 --- a/components/diy/carousel.vue +++ b/components/diy/carousel.vue @@ -227,7 +227,7 @@ if (!this.propIsCommon) { return ''; } - if (!isEmpty(form.carousel_list[actived_index].style.background_img)) { + if (!isEmpty(form.carousel_list[actived_index]?.style?.background_img)) { return background_computer(form.carousel_list[actived_index].style); } return ''; diff --git a/components/diy/tabs-carousel.vue b/components/diy/tabs-carousel.vue index 5bdfb4dc..5dc8769f 100644 --- a/components/diy/tabs-carousel.vue +++ b/components/diy/tabs-carousel.vue @@ -170,7 +170,7 @@ return ''; }, get_swiper_bg_img_style(form, actived_index) { - if (!isEmpty(form.carousel_list[actived_index].style.background_img)) { + if (!isEmpty(form.carousel_list[actived_index]?.style?.background_img)) { return background_computer(form.carousel_list[actived_index].style); } return '';