From b03b9d736297a536bb1385c80f76f55473c9f637 Mon Sep 17 00:00:00 2001
From: Alex Ford <alexrford@users.noreply.github.com>
Date: Fri, 7 Jul 2017 18:29:32 +0100
Subject: Minor fixes based on lgtm.com alerts (#6819)

* Remove a couple of superfluous trailing arguments

* Simplify assignment logic in a couple of places

* Modify some potentially inconsistent setState calls to use the function form

* Fix eslint errors
---
 webapp/components/post_view/post_body_additional_content.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'webapp/components/post_view/post_body_additional_content.jsx')

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() {
-- 
cgit v1.2.3-1-g7c22

