dwyl / hapi-socketio-redis-chat-example

:speech_balloon: Real-time Chat using Hapi.js + Socket.io + Redis Pub/Sub (example with tests!!)
GNU General Public License v2.0
364 stars 73 forks source link

Empty message form submitting anyway #89

Closed finnhodgkin closed 7 years ago

finnhodgkin commented 7 years ago

The regex to check if the message input is empty exists, it's just not hooked up to anything:

https://github.com/dwyl/hapi-socketio-redis-chat-example/blob/master/lib/client.js#L57-L63

Changing the next if statement to an 'else if' fixes this.

nelsonic commented 7 years ago

@finnhodgkin thanks for fixing. 👍