Harley преди 6 години
родител
ревизия
0726e9fd73
променени са 2 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 1 0
      service_exe/src/renderer/App.vue
  2. 4 1
      service_exe/src/renderer/pages/TheCurrentSession.vue

+ 1 - 0
service_exe/src/renderer/App.vue

@@ -100,6 +100,7 @@
 			//数据接收
 			websocketonmessage(e){
 				this.heatBeat();//收到消息会刷新心跳检测,如果一直收到消息,就推迟心跳发送
+				if(typeof e.data != 'string' ||  e.data=='') return
 				const redata = JSON.parse(e.data);//接收数据源
 				if(!redata) {
 					return

+ 4 - 1
service_exe/src/renderer/pages/TheCurrentSession.vue

@@ -936,7 +936,10 @@
 						}
 						if(type == 1){
 							if(this.session_user_info.nick_name){
-								this.sessionList[index].name = this.session_user_info.nick_name;
+								if(this.sessionList[index]){
+									this.sessionList[index].name = this.session_user_info.nick_name;
+								}
+
 							}
 							this.$store.dispatch("SET_SESSION",this.sessionList);
 							this.$store.dispatch("SET_SESSION_NAME",this.sessionList[index].name);