浏览代码

Bugfix. Check if from exists

JC Brand 12 年之前
父节点
当前提交
7a46e0ed73
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Libraries/strophe.muc.js

+ 1 - 0
Libraries/strophe.muc.js

@@ -75,6 +75,7 @@
                 this._muc_handler = this._connection.addHandler(function(stanza) {
                     var from, handler, handlers, id, roomname, x, xmlns, xquery, _i, _len;
                     from = stanza.getAttribute('from');
+                    if (!from) { return true; }
                     roomname = from.split("/")[0];
                     if (!_this.rooms[roomname]) { return true; }
                     room = _this.rooms[roomname];