From 2f8583ce4a2f115914d9af625eb83d905158ad8d Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 27 Aug 2018 17:43:55 +0200 Subject: [PATCH] [Glitch] Wait until relationship is loaded before showing follow button Port 38f6a43960af8bd13740c9a45b3399e19e13b6f4 to glitch-soc --- .../flavours/glitch/features/account/components/header.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index 174df0cc98..eda0d637eb 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -56,7 +56,9 @@ export default class Header extends ImmutablePureComponent { } if (me !== account.get('id')) { - if (account.getIn(['relationship', 'requested'])) { + if (!account.get('relationship')) { // Wait until the relationship is loaded + actionBtn = ''; + } else if (account.getIn(['relationship', 'requested'])) { actionBtn = (