[Client] Fix bug

This commit is contained in:
syuilo 2017-02-19 08:02:59 +09:00
parent 0a09c5b461
commit 3f7da98b36

View file

@ -20,9 +20,9 @@ module.exports = me => {
socket.onmessage = message => { socket.onmessage = message => {
try { try {
const message = JSON.parse(message.data); const msg = JSON.parse(message.data);
if (message.type) { if (msg.type) {
event.trigger(message.type, message.body); event.trigger(msg.type, msg.body);
} }
} catch (e) { } catch (e) {
// noop // noop