diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-06-18 17:39:12 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-06-18 17:39:12 -0400 |
commit | 9f86db9faa454757550cfb1d705acc672c94609c (patch) | |
tree | 32fcf3414efe0015389b46570cd122a45a5629b9 /web/react/components | |
parent | d519f678e6d888cbfb06129e31f4ec9eb2a3b64f (diff) | |
download | chat-9f86db9faa454757550cfb1d705acc672c94609c.tar.gz chat-9f86db9faa454757550cfb1d705acc672c94609c.tar.bz2 chat-9f86db9faa454757550cfb1d705acc672c94609c.zip |
fixes br tags causing new lines
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/create_post.jsx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx index 191be9bf8..a534e495d 100644 --- a/web/react/components/create_post.jsx +++ b/web/react/components/create_post.jsx @@ -31,9 +31,7 @@ module.exports = React.createClass({ post.message = this.state.messageText; - var repRegex = new RegExp("<br>", "g"); - if (post.message.replace(repRegex, " ").trim().length === 0 - && this.state.previews.length === 0) { + if (post.message.trim().length === 0 && this.state.previews.length === 0) { return; } |