add socket response type judgment

This commit is contained in:
龚祖望 2022-11-15 11:24:10 +08:00
parent 8bcb1b7723
commit 4d23ccf85d
1 changed files with 1 additions and 1 deletions

View File

@ -516,7 +516,7 @@ export default {
}
socket.onmessage = (msg) => {
console.log('msg', msg)
if (msg.data) {
if (msg.data && msg.data instanceof Object) {
this.data = JSON.parse(msg.data)
console.log('data', this.data)
}