From 8d81920cfb4eabc44f2b11e3f2ff57ea8dc5e63b Mon Sep 17 00:00:00 2001 From: Johannes Hertenstein Date: Fri, 12 Sep 2014 01:34:43 +0200 Subject: [PATCH] Fix error, if joinChat callback is missing --- oscar.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oscar.js b/oscar.js index ed5d40e..dd482d6 100644 --- a/oscar.js +++ b/oscar.js @@ -593,6 +593,8 @@ OscarConnection.prototype.getOfflineMsgs = function() { }; OscarConnection.prototype.joinChat = function(name, cb) { + cb = cb || function(err){console.log(err)} + var self = this; if (!self._state.chatrooms[name]) { var exchange = 4;