Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(mobile): fixed undefined is not an object (evaluating action.conference.callUUID)

Calin-Teodor8b4ebe4fa3fb
diff --git a/react/features/mobile/call-integration/middleware.ts b/react/features/mobile/call-integration/middleware.ts
index eb96516a9f..f2ce4fc39c 100644
--- a/react/features/mobile/call-integration/middleware.ts
+++ b/react/features/mobile/call-integration/middleware.ts
@@ -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);
}
}
@@ -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
@@ -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;