Skip to content

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

fix(settings): trying to access getMetadata() of undefined

Calin-Teodordeb0e36f84aa
diff --git a/react/features/settings/functions.any.ts b/react/features/settings/functions.any.ts
index d0e9a18b15..36de8f8f32 100644
--- a/react/features/settings/functions.any.ts
+++ b/react/features/settings/functions.any.ts
@@ -145,7 +145,8 @@ export function getModeratorTabProps(stateful: IStateful) {
const followMeActive = isFollowMeActive(state);
const followMeRecorderActive = isFollowMeRecorderActive(state);
const showModeratorSettings = shouldShowModeratorSettings(state);
- const disableChatWithPermissions = !conference?.getMetadataHandler().getMetadata().allownersEnabled;
+ const conferenceMetadata = conference?.getMetadataHandler()?.getMetadata();
+ const disableChatWithPermissions = !conferenceMetadata?.allownersEnabled;
const isAudioModerationEnabled = isEnabledFromState(MEDIA_TYPE.AUDIO, state);
const isVideoModerationEnabled = isEnabledFromState(MEDIA_TYPE.VIDEO, state);