0👍
This error usually means that the icons
variable is not the type that you expect it to be.
Often it’s because it’s an array. In that case, a string
can’t be used to index the type of the array because a number
is needed to do that. e.g. icons[2]
.
I would try console logging the icons variable and seeing what comes out, from there you can figure out what you need to use to index it 🙂
I hope this helps!
- [Vuejs]-In Vue, which has a higher priority, manually changing the DOM content or updating the DOM content through virtual DOM?
- [Vuejs]-Function to add line break without using <br> html
Source:stackexchange.com