My array has a data. Why did this error pop up in my console:
Error in render: "TypeError: Cannot read property 'type' of undefined"
vue code inside method:
getRoomType(assign_id){
return this.roomTypeName.find(o => o.room_id === parseInt(assign_id)).type;
},
vue html:
<span>{{ option.value }} ({{(option.assign_id=='no')? 'unassign' : getRoomType(option.assign_id) }})</span>