feat(errors): fix error handling for connection and conference
Properly handle errors while connecting or joining a conference. Prior to this patch, only errors on established conferences / connections were saved to the redux store.
This commit is contained in:
parent
eae9ddabad
commit
de0d69a20e
|
@ -82,7 +82,10 @@ ReducerRegistry.register('features/base/conference', (state = {}, action) => {
|
|||
* reduction of the specified action.
|
||||
*/
|
||||
function _conferenceFailed(state, { conference, error }) {
|
||||
if (state.conference && state.conference !== conference) {
|
||||
// The active conference or the one we are joining.
|
||||
const conference_ = state.conference || state.joining;
|
||||
|
||||
if (conference_ && conference_ !== conference) {
|
||||
return state;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,11 @@ function _connectionFailed(
|
|||
connection: Object,
|
||||
error: Object | string
|
||||
}) {
|
||||
if (state.connection && state.connection !== connection) {
|
||||
|
||||
// The active or in-progress connection.
|
||||
const connection_ = state.connecting || state.connection;
|
||||
|
||||
if (connection_ && connection_ !== connection) {
|
||||
return state;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue