From 1c041356a1c264347a787b0370163df7753ef3da Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Thu, 21 Dec 2023 21:19:18 +0100 Subject: [PATCH] Fix error on viewing a profile when unlogged (#28465) --- app/javascript/mastodon/features/account/components/header.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/javascript/mastodon/features/account/components/header.jsx b/app/javascript/mastodon/features/account/components/header.jsx index ab9526f66a..97f68c2217 100644 --- a/app/javascript/mastodon/features/account/components/header.jsx +++ b/app/javascript/mastodon/features/account/components/header.jsx @@ -85,6 +85,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')) {