-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Version
2.3.4
Reproduction link
Steps to reproduce
Working with vuejs as I upgraded to vuejs2 I am unable to get the length of an array exist within an array. I am unable to get its length inside a vuejs function but not in template.
<div class="form-row reply" v-if="comment.replies.length > 1">
<a v-if="viewcomment[index]" @click="showComments(index)">Hide comments {{comment.replies.length - 1}}</a>
<a v-else @click="showComments(index)">View more {{comment.replies.length - 1}} comments </a>
</div>
What is expected?
I was expecting to get the length of array.
What is actually happening?
I am getting error "TypeError: Cannot read property 'length' of undefined"
nickgayo12
Metadata
Metadata
Assignees
Labels
No labels