Fix flow errors from base/connection

This commit is contained in:
Bettenbuk Zoltan
2019-04-08 15:10:31 +02:00
committed by Saúl Ibarra Corretgé
parent 3987655f2a
commit 18d908ce84
4 changed files with 9 additions and 4 deletions

View File

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

View File

@@ -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;
}
/**

View File

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