diff options
author | Victor Chabbert <chabbertvi@eisti.eu> | 2016-12-21 00:03:56 +0100 |
---|---|---|
committer | Victor Chabbert <chabbertvi@eisti.eu> | 2016-12-21 00:03:56 +0100 |
commit | 32551149a85a82f7511e1f8a6151d49c08a09462 (patch) | |
tree | 77b0c5a1f4b8c8be2cd85d726aa1bc588f8baec2 /src | |
parent | Add interceptor for invalid subscriptions (diff) | |
download | seven-wonders-32551149a85a82f7511e1f8a6151d49c08a09462.tar.gz seven-wonders-32551149a85a82f7511e1f8a6151d49c08a09462.tar.bz2 seven-wonders-32551149a85a82f7511e1f8a6151d49c08a09462.zip |
Fix json not parsing errors
Diffstat (limited to 'src')
-rw-r--r-- | src/main/js/src/containers/App/saga.js | 2 | ||||
-rw-r--r-- | src/main/js/src/containers/GameBrowser/saga.js | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/main/js/src/containers/App/saga.js b/src/main/js/src/containers/App/saga.js index f1f72dfd..0c212142 100644 --- a/src/main/js/src/containers/App/saga.js +++ b/src/main/js/src/containers/App/saga.js @@ -3,7 +3,7 @@ import { eventChannel } from 'redux-saga' function createSocketChannel(socket) { return eventChannel(emit => { - const errorHandler = event => emit(JSON.parse(event)) + const errorHandler = event => emit(JSON.parse(event.body)) const userErrors = socket.subscribe('/user/queue/errors', errorHandler) diff --git a/src/main/js/src/containers/GameBrowser/saga.js b/src/main/js/src/containers/GameBrowser/saga.js index 8f947683..f28f5562 100644 --- a/src/main/js/src/containers/GameBrowser/saga.js +++ b/src/main/js/src/containers/GameBrowser/saga.js @@ -8,6 +8,7 @@ function createSocketChannel(socket) { return eventChannel(emit => { const makeHandler = (type) => (event) => { const response = JSON.parse(event.body) + emit({ type, response |