I have v-for loop in html, in my localhost everything works fine, but whenever I deploy to production I keep getting this error
TypeError: Cannot read property 'url' of null
, even though the url exists in the objects.
<div v-for="item in items" :key="item.id">
<div :style="{ backgroundImage: (`url(${item.cover_media.url}`)}")></div>
</div>
I am trying to use this solution: https://stackoverflow.com/a/54591429/16897778
This is the only item I have and u can see the image is loaded
but console still throws and whenever I add more items, it can't fetch more than 1. How can I fix this issue?