Ver código fonte

Flow, coding style

j8
Lyubo Marinov 8 anos atrás
pai
commit
5e01abf6fb

+ 2
- 0
react/features/app/middleware.js Ver arquivo

@@ -1,3 +1,5 @@
1
+// @flow
2
+
1 3
 import { SET_ROOM } from '../base/conference';
2 4
 import {
3 5
     CONNECTION_ESTABLISHED,

+ 3
- 3
react/features/base/connection/actions.native.js Ver arquivo

@@ -1,4 +1,4 @@
1
-/* @flow */
1
+// @flow
2 2
 
3 3
 import _ from 'lodash';
4 4
 import type { Dispatch } from 'redux';
@@ -263,7 +263,7 @@ export function disconnect() {
263 263
         const state = getState();
264 264
         const { conference, joining } = state['features/base/conference'];
265 265
 
266
-        // The conference we are joining or have already joined.
266
+        // The conference we have already joined or are joining.
267 267
         const conference_ = conference || joining;
268 268
 
269 269
         // Promise which completes when the conference has been left and the
@@ -286,7 +286,7 @@ export function disconnect() {
286 286
         // Disconnect the connection.
287 287
         const { connecting, connection } = state['features/base/connection'];
288 288
 
289
-        // The connection we are connecting or have already connected.
289
+        // The connection we have already connected or are connecting.
290 290
         const connection_ = connection || connecting;
291 291
 
292 292
         if (connection_) {

+ 2
- 5
react/features/base/jwt/middleware.js Ver arquivo

@@ -179,12 +179,9 @@ function _setConfigOrLocationURL({ dispatch, getState }, next, action) {
179 179
     const result = next(action);
180 180
 
181 181
     const { locationURL } = getState()['features/base/connection'];
182
-    let jwt;
183 182
 
184
-    if (locationURL) {
185
-        jwt = parseJWTFromURLParams(locationURL);
186
-    }
187
-    dispatch(setJWT(jwt));
183
+    dispatch(
184
+        setJWT(locationURL ? parseJWTFromURLParams(locationURL) : undefined));
188 185
 
189 186
     return result;
190 187
 }

Carregando…
Cancelar
Salvar