From 5e01abf6fbefe882448e5e133f3a7055438546ac Mon Sep 17 00:00:00 2001 From: Lyubo Marinov Date: Tue, 17 Oct 2017 17:10:42 -0500 Subject: [PATCH] Flow, coding style --- react/features/app/middleware.js | 2 ++ react/features/base/connection/actions.native.js | 6 +++--- react/features/base/jwt/middleware.js | 7 ++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/react/features/app/middleware.js b/react/features/app/middleware.js index 8fd5eee61..15159352a 100644 --- a/react/features/app/middleware.js +++ b/react/features/app/middleware.js @@ -1,3 +1,5 @@ +// @flow + import { SET_ROOM } from '../base/conference'; import { CONNECTION_ESTABLISHED, diff --git a/react/features/base/connection/actions.native.js b/react/features/base/connection/actions.native.js index 12b2d2867..7dd36e397 100644 --- a/react/features/base/connection/actions.native.js +++ b/react/features/base/connection/actions.native.js @@ -1,4 +1,4 @@ -/* @flow */ +// @flow import _ from 'lodash'; import type { Dispatch } from 'redux'; @@ -263,7 +263,7 @@ export function disconnect() { const state = getState(); const { conference, joining } = state['features/base/conference']; - // The conference we are joining or have already joined. + // The conference we have already joined or are joining. const conference_ = conference || joining; // Promise which completes when the conference has been left and the @@ -286,7 +286,7 @@ export function disconnect() { // Disconnect the connection. const { connecting, connection } = state['features/base/connection']; - // The connection we are connecting or have already connected. + // The connection we have already connected or are connecting. const connection_ = connection || connecting; if (connection_) { diff --git a/react/features/base/jwt/middleware.js b/react/features/base/jwt/middleware.js index 7f6a1fefe..942de6d47 100644 --- a/react/features/base/jwt/middleware.js +++ b/react/features/base/jwt/middleware.js @@ -179,12 +179,9 @@ function _setConfigOrLocationURL({ dispatch, getState }, next, action) { const result = next(action); const { locationURL } = getState()['features/base/connection']; - let jwt; - if (locationURL) { - jwt = parseJWTFromURLParams(locationURL); - } - dispatch(setJWT(jwt)); + dispatch( + setJWT(locationURL ? parseJWTFromURLParams(locationURL) : undefined)); return result; }