[Client] Fix bug
This commit is contained in:
parent
0a09c5b461
commit
3f7da98b36
1 changed files with 3 additions and 3 deletions
|
@ -20,9 +20,9 @@ module.exports = me => {
|
|||
|
||||
socket.onmessage = message => {
|
||||
try {
|
||||
const message = JSON.parse(message.data);
|
||||
if (message.type) {
|
||||
event.trigger(message.type, message.body);
|
||||
const msg = JSON.parse(message.data);
|
||||
if (msg.type) {
|
||||
event.trigger(msg.type, msg.body);
|
||||
}
|
||||
} catch (e) {
|
||||
// noop
|
||||
|
|
Loading…
Reference in a new issue