|
@@ -83,7 +83,8 @@ function _appWillMount({ dispatch, getState }: IStore, next: Function, action: A
|
83
|
83
|
* @returns {*} The result returned by {@code next(action)}.
|
84
|
84
|
*/
|
85
|
85
|
function _conferenceWillLeave({ dispatch, getState }: IStore, next: Function, action: AnyAction) {
|
86
|
|
- const { doNotStoreRoom } = getState()['features/base/config'];
|
|
86
|
+ const state = getState();
|
|
87
|
+ const { doNotStoreRoom } = state['features/base/config'];
|
87
|
88
|
|
88
|
89
|
if (!doNotStoreRoom && !inIframe()) {
|
89
|
90
|
let locationURL;
|
|
@@ -100,13 +101,17 @@ function _conferenceWillLeave({ dispatch, getState }: IStore, next: Function, ac
|
100
|
101
|
* JITSI_CONFERENCE_URL_KEY so we cannot call it and must use the other way.
|
101
|
102
|
*/
|
102
|
103
|
if (typeof APP === 'undefined') {
|
103
|
|
- locationURL = action.conference[JITSI_CONFERENCE_URL_KEY];
|
|
104
|
+ const { conference } = action;
|
|
105
|
+
|
|
106
|
+ // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
107
|
+ locationURL = conference && conference[JITSI_CONFERENCE_URL_KEY];
|
104
|
108
|
} else {
|
105
|
|
- locationURL = getState()['features/base/connection'].locationURL;
|
|
109
|
+ locationURL = state['features/base/connection'].locationURL;
|
106
|
110
|
}
|
107
|
111
|
dispatch(
|
108
|
112
|
_updateConferenceDuration(
|
109
|
|
- locationURL));
|
|
113
|
+ locationURL
|
|
114
|
+ ));
|
110
|
115
|
}
|
111
|
116
|
|
112
|
117
|
return next(action);
|