summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_view/post_body_additional_content.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/post_view/post_body_additional_content.jsx')
-rw-r--r--webapp/components/post_view/post_body_additional_content.jsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/webapp/components/post_view/post_body_additional_content.jsx b/webapp/components/post_view/post_body_additional_content.jsx
index 107c75778..2782c346f 100644
--- a/webapp/components/post_view/post_body_additional_content.jsx
+++ b/webapp/components/post_view/post_body_additional_content.jsx
@@ -62,7 +62,9 @@ export default class PostBodyAdditionalContent extends React.PureComponent {
}
toggleEmbedVisibility() {
- this.setState({embedVisible: !this.state.embedVisible});
+ this.setState((prevState) => {
+ return {embedVisible: !prevState.embedVisible};
+ });
}
getSlackAttachment() {