From c297b491d914912e2d17d0e186e8b6ff02da7620 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 19 Feb 2017 08:02:59 +0900 Subject: [PATCH] [Client] Fix bug --- src/web/app/common/scripts/stream.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/web/app/common/scripts/stream.js b/src/web/app/common/scripts/stream.js index b31e57044..5c8c3e107 100644 --- a/src/web/app/common/scripts/stream.js +++ b/src/web/app/common/scripts/stream.js @@ -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