[Glitch] Fix error on viewing a profile when unlogged

Port 1c041356a1 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/2548/head
Renaud Chaput 2023-12-21 21:19:18 +01:00 committed by Claire
parent ad1d7b9c7d
commit beeb9bc99c
1 changed files with 2 additions and 0 deletions

View File

@ -74,6 +74,8 @@ const titleFromAccount = account => {
};
const messageForFollowButton = relationship => {
if(!relationship) return messages.follow;
if (relationship.get('following') && relationship.get('followed_by')) {
return messages.mutual;
} else if (!relationship.get('following') && relationship.get('followed_by')) {