Skip to content

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

rn,welcome: fix accessing local participant

Saúl Ibarra Corretgée0815de2ad27
diff --git a/react/features/welcome/components/WelcomePageSideBar.native.js b/react/features/welcome/components/WelcomePageSideBar.native.js
index faf6bb7e35..761e975208 100644
--- a/react/features/welcome/components/WelcomePageSideBar.native.js
+++ b/react/features/welcome/components/WelcomePageSideBar.native.js
@@ -44,12 +44,12 @@ type Props = {
/**
* Display name of the local participant.
*/
- _displayName: string,
+ _displayName: ?string,
/**
* ID of the local participant.
*/
- _localParticipantId: string,
+ _localParticipantId: ?string,
/**
* Sets the side bar visible or hidden.
@@ -157,10 +157,12 @@ class WelcomePageSideBar extends Component<Props> {
*/
function _mapStateToProps(state: Object) {
const _localParticipant = getLocalParticipant(state);
+ const _localParticipantId = _localParticipant?.id;
+ const _displayName = _localParticipant && getParticipantDisplayName(state, _localParticipantId);
return {
- _displayName: getParticipantDisplayName(state, _localParticipant.id),
- _localParticipantId: _localParticipant.id,
+ _displayName,
+ _localParticipantId,
_visible: state['features/welcome'].sideBarVisible
};
}