0👍
just check the variable(which you assigning after getting a response) is null or not null
eg:
applySlider() {
if(this.products){
if (this.products.length >= 1) {
$(".regular").slick({
//dots: true,
infinite: true,
slidesToShow: 4,
slidesToScroll: 4,
responsive: [
{
breakpoint: 992,
settings: {
slidesToShow: 3,
slidesToScroll: 3,
infinite: true,
dots: true,
arrows:false,
}
},
{
breakpoint: 768,
settings: {
slidesToShow: 2,
slidesToScroll: 2,
arrows:false,
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 2,
slidesToScroll: 2,
arrows:false,
}
}
]
});
}
}
}
- [Vuejs]-Access Vuex store from javascript module
- [Vuejs]-Not sending auth request in laravel echo server cli on server
Source:stackexchange.com