diff options
Diffstat (limited to 'frontend/src/sagas/usernameChoice.js')
-rw-r--r-- | frontend/src/sagas/usernameChoice.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/frontend/src/sagas/usernameChoice.js b/frontend/src/sagas/usernameChoice.js index 60b7d327..da720e9f 100644 --- a/frontend/src/sagas/usernameChoice.js +++ b/frontend/src/sagas/usernameChoice.js @@ -10,16 +10,12 @@ function usernameValidationChannel(socket) { const receiveUsernameHandler = socket.subscribe('/user/queue/nameChoice', event => { emitter(fromJS(JSON.parse(event.body))) }) - - const unsubscribe = () => receiveUsernameHandler.unsubscribe() - - return unsubscribe + return () => receiveUsernameHandler.unsubscribe() }) } function *usernameValidation({ socket }) { - const usernameChannel = usernameValidationChannel(socket) - + const usernameChannel = yield call(usernameValidationChannel, socket) const user = yield take(usernameChannel) yield put(actions.setUsername(user.get('username'), user.get('displayName'), user.get('index'))) usernameChannel.close() |