mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 23:23:09 +02:00
[Client] Fix bug
This commit is contained in:
parent
2d9dd2ea30
commit
c297b491d9
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue