소스 검색

Fix flow errors from base/connection

master
Bettenbuk Zoltan 6 년 전
부모
커밋
18d908ce84

+ 2
- 1
react/features/authentication/components/LoginDialog.native.js 파일 보기

@@ -5,7 +5,8 @@ import { Text, TextInput, View } from 'react-native';
5 5
 import { connect as reduxConnect } from 'react-redux';
6 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 10
 import {
10 11
     CustomSubmitDialog,
11 12
     FIELD_UNDERLINE,

+ 2
- 0
react/features/base/connection/actionTypes.js 파일 보기

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

+ 3
- 3
react/features/base/connection/functions.js 파일 보기

@@ -8,16 +8,16 @@ import { toState } from '../redux';
8 8
  *
9 9
  * @param {Function|Object} stateOrGetState - The redux state or redux's
10 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 14
     const state = toState(stateOrGetState);
15 15
     const locationURL
16 16
         = state instanceof URL
17 17
             ? state
18 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 파일 보기

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

Loading…
취소
저장