0👍
Add the following to your next()
method:
if (!this.userResponses[this.index]) { return }
Note: there are many assumptions this answer is based on. I assume that userResponses
and index
are defined as your component data and you have written your next
method.
Another note: Am I seeing correctly that you are setting value of an input to true for correct answer? This is, well, a terrible idea – this basically mean I can inspect html to get 100% from your quiz.
- [Vuejs]-Problem in Vue Express with displaying image
- [Vuejs]-Cannot duplicate my form with v-for vuejs help needed
Source:stackexchange.com