Flow, coding style
This commit is contained in:
parent
0205b9f49a
commit
5e01abf6fb
|
@ -1,3 +1,5 @@
|
||||||
|
// @flow
|
||||||
|
|
||||||
import { SET_ROOM } from '../base/conference';
|
import { SET_ROOM } from '../base/conference';
|
||||||
import {
|
import {
|
||||||
CONNECTION_ESTABLISHED,
|
CONNECTION_ESTABLISHED,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* @flow */
|
// @flow
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import type { Dispatch } from 'redux';
|
import type { Dispatch } from 'redux';
|
||||||
|
@ -263,7 +263,7 @@ export function disconnect() {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const { conference, joining } = state['features/base/conference'];
|
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;
|
const conference_ = conference || joining;
|
||||||
|
|
||||||
// Promise which completes when the conference has been left and the
|
// Promise which completes when the conference has been left and the
|
||||||
|
@ -286,7 +286,7 @@ export function disconnect() {
|
||||||
// Disconnect the connection.
|
// Disconnect the connection.
|
||||||
const { connecting, connection } = state['features/base/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;
|
const connection_ = connection || connecting;
|
||||||
|
|
||||||
if (connection_) {
|
if (connection_) {
|
||||||
|
|
|
@ -179,12 +179,9 @@ function _setConfigOrLocationURL({ dispatch, getState }, next, action) {
|
||||||
const result = next(action);
|
const result = next(action);
|
||||||
|
|
||||||
const { locationURL } = getState()['features/base/connection'];
|
const { locationURL } = getState()['features/base/connection'];
|
||||||
let jwt;
|
|
||||||
|
|
||||||
if (locationURL) {
|
dispatch(
|
||||||
jwt = parseJWTFromURLParams(locationURL);
|
setJWT(locationURL ? parseJWTFromURLParams(locationURL) : undefined));
|
||||||
}
|
|
||||||
dispatch(setJWT(jwt));
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue