[Vuejs]-Cannot read property of undefinded

-1👍

You probably just need to add null check like this:

<div class="pull-left">
     <a href="#">
    <img class="media-object avatar" :src="singlePost && singlePost.user.photo_url"  alt="img" />
     </a>

Leave a comment