Fix flow errors from base/connection
This commit is contained in:
parent
3987655f2a
commit
18d908ce84
|
@ -5,7 +5,8 @@ import { Text, TextInput, View } from 'react-native';
|
|||
import { connect as reduxConnect } from 'react-redux';
|
||||
import type { Dispatch } from 'redux';
|
||||
|
||||
import { connect, toJid } from '../../base/connection';
|
||||
import { toJid } from '../../base/connection';
|
||||
import { connect } from '../../base/connection/actions.native';
|
||||
import {
|
||||
CustomSubmitDialog,
|
||||
FIELD_UNDERLINE,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// @flow
|
||||
|
||||
/**
|
||||
* The type of (redux) action which signals that a connection disconnected.
|
||||
*
|
||||
|
|
|
@ -8,16 +8,16 @@ import { toState } from '../redux';
|
|||
*
|
||||
* @param {Function|Object} stateOrGetState - The redux state or redux's
|
||||
* {@code getState} function.
|
||||
* @returns {string|undefined}
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getInviteURL(stateOrGetState: Function | Object): ?string {
|
||||
export function getInviteURL(stateOrGetState: Function | Object): string {
|
||||
const state = toState(stateOrGetState);
|
||||
const locationURL
|
||||
= state instanceof URL
|
||||
? state
|
||||
: state['features/base/connection'].locationURL;
|
||||
|
||||
return locationURL ? getURLWithoutParams(locationURL).href : undefined;
|
||||
return getURLWithoutParams(locationURL).href;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// @flow
|
||||
|
||||
export * from './actions';
|
||||
export * from './actionTypes';
|
||||
export * from './functions';
|
||||
|
|
Loading…
Reference in New Issue