Why the component is rendering correctly but the browser console throws this error?:
ERROR TypeError: Cannot read properties of undefined (reading 'length')
Thank you in advance! :)
member-profile.component.html:
<div *ngIf="member">
<div><img src="..\..\..\assets\images\avatar.png" alt="Avatar" style="width:60px; height: 60px;"><h3>{{ member.name}} {{member.surname}}</h3></div>
<div><i class="fas fa-user-tie"></i><span>Role: </span>{{ member.role }}</div>
<div><i class="fas fa-at"></i><span>Email: </span>{{ member.email }}</div>
<div><i class="fas fa-user-tag"></i><span>Username: </span>{{ member.username }}</div>
<div>
<i class="fas fa-brain"></i>
<span>Skills: </span>
<div id="Expert" *ngIf="expertList.length > 0">
Expert
<span *ngFor="let skill of expertList">
{{skill.skill}}
</span>
</div>
</div>