Skip to content

Commit

Permalink
feat(mobile): fixed undefined is not an object (evaluating action.con…
Browse files Browse the repository at this point in the history
…ference.callUUID)
  • Loading branch information
Calinteodor committed Dec 1, 2023
1 parent 45415ef commit 8b4ebe4
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions react/features/mobile/call-integration/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,10 @@ function _conferenceFailed({ getState }: IStore, next: Function, action: AnyActi
// prevented the user from joining a specific conference but the app may be
// able to eventually join the conference.
if (!action.error.recoverable) {
const { callUUID } = action.conference;

if (callUUID) {
if (action?.conference?.callUUID) {
delete action.conference.callUUID;
CallIntegration.reportCallFailed(callUUID);
CallIntegration.reportCallFailed(action.conference.callUUIDID);
}
}

Expand All @@ -185,9 +184,9 @@ function _conferenceJoined({ getState }: IStore, next: Function, action: AnyActi
return result;
}

const { callUUID } = action.conference;
if (action?.conference?.callUUID) {
const { callUUID } = action.conference;

if (callUUID) {
CallIntegration.reportConnectedOutgoingCall(callUUID)
.then(() => {
// iOS 13 doesn't like the mute state to be false before the call is started
Expand Down Expand Up @@ -230,11 +229,9 @@ function _conferenceLeft({ getState }: IStore, next: Function, action: AnyAction
return result;
}

const { callUUID } = action.conference;

if (callUUID) {
if (action?.conference?.callUUID) {
delete action.conference.callUUID;
CallIntegration.endCall(callUUID);
CallIntegration.endCall(action.conference.callUUID);
}

return result;
Expand Down

0 comments on commit 8b4ebe4

Please sign in to comment.