Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Flow, coding style

Lyubo Marinov5e01abf6fbef
diff --git a/react/features/app/middleware.js b/react/features/app/middleware.js
index 8fd5eee613..15159352ae 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 12b2d28671..7dd36e3979 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 7f6a1fefe3..942de6d471 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;
}