浏览代码

Bugfix. "ev" isn't necessarily defined.

JC Brand 10 年之前
父节点
当前提交
35928308c8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      converse.js

+ 1 - 1
converse.js

@@ -1051,7 +1051,7 @@
             },
 
             clearChatRoomMessages: function (ev) {
-                ev.stopPropagation();
+                if (typeof ev !== "undefined") { ev.stopPropagation(); }
                 var result = confirm(__("Are you sure you want to clear the messages from this room?"));
                 if (result === true) {
                     this.$el.find('.chat-content').empty();