Authored by 陈轩

fix

@@ -125,10 +125,16 @@ var chat = { @@ -125,10 +125,16 @@ var chat = {
125 }) 125 })
126 .on('keydown.chat.sendText', '.text-in', function(event) { 126 .on('keydown.chat.sendText', '.text-in', function(event) {
127 if (event.which === 13) { 127 if (event.which === 13) {
  128 + let val = $.trim(event.target.value);
  129 +
  130 + if (!val) {
  131 + return ;
  132 + }
  133 +
128 let content = { 134 let content = {
129 avatar: userAvatar, 135 avatar: userAvatar,
130 data: { 136 data: {
131 - content: $.trim(event.target.value) 137 + content: val
132 } 138 }
133 }; 139 };
134 140