fix(Xo#_watchObject): check for notify()

This commit is contained in:
Julien Fontanet 2016-07-29 14:29:57 +02:00
parent 5adfe9a552
commit d83bf0ebaf

View File

@ -330,7 +330,7 @@ export default class Xo extends EventEmitter {
forEach(connections, connection => {
// Notifies only authenticated clients.
if (connection.has('user_id')) {
if (connection.has('user_id') && connection.notify) {
if (enteredMessage) {
connection.notify('all', enteredMessage)
}