π€π₯ππ₯π€ Solved it! Thank you @keenen @yuyu for the lifesaver help!
Solution: Had to wrap a v-if to check if accDetailsAll[streak.author] exists before checking with another v-if for .profileImg
------
Penning down my approach for this feature, for future reference:
β’ accDetailsAll will contain all authors details. Their position in the index will match their author id.
β’ streaks only return authors with streaks, but it comes with author id too.
β’ so by accDetailsAll[streak.author - 1], I'm using the streak author id to find the correct index position of the author details in the array
β’ Downside of this approach is: if a user delete his account, the index position of accDetailsAll will be messed up. Would PostgresQL skip id numbers too in their tables?
------
Penning down my approach for this feature, for future reference:
β’ accDetailsAll will contain all authors details. Their position in the index will match their author id.
β’ streaks only return authors with streaks, but it comes with author id too.
β’ so by accDetailsAll[streak.author - 1], I'm using the streak author id to find the correct index position of the author details in the array
β’ Downside of this approach is: if a user delete his account, the index position of accDetailsAll will be messed up. Would PostgresQL skip id numbers too in their tables?