Merge branch 'only-emoji-fix-2' into 'develop'

Big emojis: fix race condition

See merge request soapbox-pub/soapbox-fe!593
actually-fix-tabs-bar
Alex Gleason 2021-07-09 23:53:03 +00:00
commit 19ed7b6883
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -91,8 +91,11 @@ class StatusContent extends React.PureComponent {
}
setOnlyEmoji = () => {
if (this.node && this.state.onlyEmoji === undefined) {
this.setState({ onlyEmoji: onlyEmoji(this.node, BIG_EMOJI_LIMIT, true) });
if (!this.node) return;
const only = onlyEmoji(this.node, BIG_EMOJI_LIMIT, true);
if (only !== this.state.onlyEmoji) {
this.setState({ onlyEmoji: only });
}
}