From 3106c81b1e96cdcb5de9afa3507f344dc11705a3 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 cd049454be9cb8bf5fb6bc5316539432316033aa 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 174df0cc9..eda0d637e 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 = (