π WOOHOO solved it! Finally found a condition to conditionally render the profile images of users without the content-type "account" and `.profileImg`
My problem had been I had 3 types of data, and I want to show different profile image with different data.
- user with account and profile image url - render `streak.profileImg`
- user with account but no profile image url, use `streak.author.id` to render robovatar
- user without account, use `streak.author` (notice it's different!) to render robovatar
I could v-if the first 2 using `v-if="streak.profileImg"` and `v-else-if="streak.profileImg == '' || streak.profileImg == null" respectively, but the 3rd one somehow doesnt work using `v-else` or `v-else-if="!streak.profileImg"`.
In the end for 3rd one I found a hack:
`v-if="typeof `${streak.author}` === 'string'"` because only for users without account their `author` data is a string(`"11"`), not an `Object`.
- user with account and profile image url - render `streak.profileImg`
- user with account but no profile image url, use `streak.author.id` to render robovatar
- user without account, use `streak.author` (notice it's different!) to render robovatar
I could v-if the first 2 using `v-if="streak.profileImg"` and `v-else-if="streak.profileImg == '' || streak.profileImg == null" respectively, but the 3rd one somehow doesnt work using `v-else` or `v-else-if="!streak.profileImg"`.
In the end for 3rd one I found a hack:
`v-if="typeof `${streak.author}` === 'string'"` because only for users without account their `author` data is a string(`"11"`), not an `Object`.