Browse Source

Wait until relationship is loaded before showing follow button (#8440)

Fix #8410
pull/4/head
Eugen Rochko 5 years ago
committed by GitHub
parent
commit
cd049454be
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      app/javascript/mastodon/features/account/components/header.js

+ 3
- 1
app/javascript/mastodon/features/account/components/header.js View File

@ -104,7 +104,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 = (
<div className='account--action-button'>
<IconButton size={26} active icon='hourglass' title={intl.formatMessage(messages.requested)} onClick={this.props.onFollow} />

Loading…
Cancel
Save