I'm encountering an issue with my filtering function in VueJS. While it works fine, I am seeing a warning message in the console. You can check out this example to see the problem.
The problem arises when I need to filter relational data from a separate array using the getClan() function. This function returns an array and I only need to use the data from the first element. However, upon loop completion, I receive this warning:
[Vue warn]: Error in render function: "TypeError: this.clans.filter(...)[0] is undefined"
The warning appears on Chrome and Firefox consoles but interestingly doesn't show up on codepen's local console. It seems to be isolated from certain warnings for some reason.
This warning specifically occurs at the end of the for loop, even with a larger dataset. I am considering computed properties as a solution, although passing arguments to them is not possible.