diff options
Diffstat (limited to 'frontend/src/sagas.js')
-rw-r--r-- | frontend/src/sagas.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/frontend/src/sagas.js b/frontend/src/sagas.js index c5166cd5..ff66453e 100644 --- a/frontend/src/sagas.js +++ b/frontend/src/sagas.js @@ -1,18 +1,18 @@ -import { router } from 'redux-saga-router' -import { call, fork } from 'redux-saga/effects' +import { router } from "redux-saga-router"; +import { call, fork } from "redux-saga/effects"; -import { makeSagaRoutes } from './routes' -import { createWsConnection } from './utils/websocket' -import errorHandlingSaga from './sagas/errors' +import { makeSagaRoutes } from "./routes"; +import { createWsConnection } from "./utils/websocket"; +import errorHandlingSaga from "./sagas/errors"; -export default function *rootSaga(history) { - let wsConnection +export default function* rootSaga(history) { + let wsConnection; try { - wsConnection = yield call(createWsConnection) + wsConnection = yield call(createWsConnection); } catch (error) { - console.error('Could not connect to socket') - return + console.error("Could not connect to socket"); + return; } - yield fork(errorHandlingSaga, wsConnection) - yield* router(history, makeSagaRoutes(wsConnection)) + yield fork(errorHandlingSaga, wsConnection); + yield* router(history, makeSagaRoutes(wsConnection)); } |