summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_view/post_body_additional_content.jsx
diff options
context:
space:
mode:
authorAlex Ford <alexrford@users.noreply.github.com>2017-07-07 18:29:32 +0100
committerJoram Wilander <jwawilander@gmail.com>2017-07-07 13:29:32 -0400
commitb03b9d736297a536bb1385c80f76f55473c9f637 (patch)
tree02624e221c072f1c6d70e01e29caf41645337b64 /webapp/components/post_view/post_body_additional_content.jsx
parente6ca2974cd504b26eee2549deb59b924daa4a104 (diff)
downloadchat-b03b9d736297a536bb1385c80f76f55473c9f637.tar.gz
chat-b03b9d736297a536bb1385c80f76f55473c9f637.tar.bz2
chat-b03b9d736297a536bb1385c80f76f55473c9f637.zip
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
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() {