Fix flow errors from base/connection
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
3987655f2a
commit
18d908ce84
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user