Remove text requirement when media attached from statuses (fixes #381)

Ports cfa9b6e13a to glitchsoc
This commit is contained in:
Thibaut Girka
2018-03-12 18:39:07 +01:00
parent a0724cd742
commit 841ef606a9
4 changed files with 19 additions and 7 deletions

View File

@ -23,7 +23,12 @@ export default class StatusContent extends React.PureComponent {
};
_updateStatusLinks () {
const node = this.node;
const node = this.node;
if (!node) {
return;
}
const links = node.querySelectorAll('a');
for (var i = 0; i < links.length; ++i) {
@ -126,6 +131,10 @@ export default class StatusContent extends React.PureComponent {
disabled,
} = this.props;
if (status.get('content').length === 0) {
return null;
}
const hidden = this.props.setExpansion ? !this.props.expanded : this.state.hidden;
const content = { __html: status.get('contentHtml') };