[Vuejs]-Cannot read properties of undefined (reading 'name')"

0👍

company_profiles.profile.projects is an array, so reading .team on it is undefined.

maybe try

<div
  v-for="project in company_profiles.profile.projects"
  :key="project.id"
>
  <h3>{{ project.name }}</h3>

  <h4>contract:</h4>
  <pre v-html="project.team?.teammate?.contract" />
</div>

Leave a comment