diff options
author | Alex Ford <alexrford@users.noreply.github.com> | 2017-07-07 18:29:32 +0100 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-07-07 13:29:32 -0400 |
commit | b03b9d736297a536bb1385c80f76f55473c9f637 (patch) | |
tree | 02624e221c072f1c6d70e01e29caf41645337b64 /webapp/components/textbox.jsx | |
parent | e6ca2974cd504b26eee2549deb59b924daa4a104 (diff) | |
download | chat-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/textbox.jsx')
-rw-r--r-- | webapp/components/textbox.jsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/webapp/components/textbox.jsx b/webapp/components/textbox.jsx index 55980d331..536b1a115 100644 --- a/webapp/components/textbox.jsx +++ b/webapp/components/textbox.jsx @@ -157,7 +157,9 @@ export default class Textbox extends React.Component { showPreview(e) { e.preventDefault(); e.target.blur(); - this.setState({preview: !this.state.preview}); + this.setState((prevState) => { + return {preview: prevState.preview}; + }); } hidePreview() { |