Browse Source

Fix flow errors from base/connection

master
Bettenbuk Zoltan 6 years ago
parent
commit
18d908ce84

+ 2
- 1
react/features/authentication/components/LoginDialog.native.js View File

5
 import { connect as reduxConnect } from 'react-redux';
5
 import { connect as reduxConnect } from 'react-redux';
6
 import type { Dispatch } from 'redux';
6
 import type { Dispatch } from 'redux';
7
 
7
 
8
-import { connect, toJid } from '../../base/connection';
8
+import { toJid } from '../../base/connection';
9
+import { connect } from '../../base/connection/actions.native';
9
 import {
10
 import {
10
     CustomSubmitDialog,
11
     CustomSubmitDialog,
11
     FIELD_UNDERLINE,
12
     FIELD_UNDERLINE,

+ 2
- 0
react/features/base/connection/actionTypes.js View File

1
+// @flow
2
+
1
 /**
3
 /**
2
  * The type of (redux) action which signals that a connection disconnected.
4
  * The type of (redux) action which signals that a connection disconnected.
3
  *
5
  *

+ 3
- 3
react/features/base/connection/functions.js View File

8
  *
8
  *
9
  * @param {Function|Object} stateOrGetState - The redux state or redux's
9
  * @param {Function|Object} stateOrGetState - The redux state or redux's
10
  * {@code getState} function.
10
  * {@code getState} function.
11
- * @returns {string|undefined}
11
+ * @returns {string}
12
  */
12
  */
13
-export function getInviteURL(stateOrGetState: Function | Object): ?string {
13
+export function getInviteURL(stateOrGetState: Function | Object): string {
14
     const state = toState(stateOrGetState);
14
     const state = toState(stateOrGetState);
15
     const locationURL
15
     const locationURL
16
         = state instanceof URL
16
         = state instanceof URL
17
             ? state
17
             ? state
18
             : state['features/base/connection'].locationURL;
18
             : state['features/base/connection'].locationURL;
19
 
19
 
20
-    return locationURL ? getURLWithoutParams(locationURL).href : undefined;
20
+    return getURLWithoutParams(locationURL).href;
21
 }
21
 }
22
 
22
 
23
 /**
23
 /**

+ 2
- 0
react/features/base/connection/index.js View File

1
+// @flow
2
+
1
 export * from './actions';
3
 export * from './actions';
2
 export * from './actionTypes';
4
 export * from './actionTypes';
3
 export * from './functions';
5
 export * from './functions';

Loading…
Cancel
Save