react-firebase-chat icon indicating copy to clipboard operation
react-firebase-chat copied to clipboard

disable sending 'all white space' messages

Open chmus opened this issue 4 years ago • 1 comments

Chat currently does not check whether the message is 'all white space' text. This small addition should fix it. However, I am currently unable to test if this will work, so it can be a wrong fix.

P. S. By the way, I am experienced neither in making pull requests nor in React 😅. Hopefully, it will not cause any problems.

chmus avatar Sep 24 '20 19:09 chmus

Looks fine, but would be shorter and possibly faster if you used String.prototype.trim()

hakanrw avatar Sep 27 '20 12:09 hakanrw