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(config) fix prejoin throwing a TypeError due to late config initialization (#10041)

Avram Tudor6b8db2ad9e02
diff --git a/react/features/toolbox/functions.native.js b/react/features/toolbox/functions.native.js
index 50f8619c6d..47ccd5cea0 100644
--- a/react/features/toolbox/functions.native.js
+++ b/react/features/toolbox/functions.native.js
@@ -60,7 +60,8 @@ export function getMovableButtons(width: number): Set<string> {
*/
export function isToolboxVisible(stateful: Object | Function) {
const state = toState(stateful);
- const { toolbarConfig: { alwaysVisible } } = state['features/base/config'];
+ const { toolbarConfig } = state['features/base/config'];
+ const { alwaysVisible } = toolbarConfig || {};
const { enabled, visible } = state['features/toolbox'];
const participantCount = getParticipantCountWithFake(state);
const alwaysVisibleFlag = getFeatureFlag(state, TOOLBOX_ALWAYS_VISIBLE, false);
diff --git a/react/features/toolbox/functions.web.js b/react/features/toolbox/functions.web.js
index 81c20c77c2..2df9bcd5fd 100644
--- a/react/features/toolbox/functions.web.js
+++ b/react/features/toolbox/functions.web.js
@@ -39,7 +39,8 @@ export function isButtonEnabled(name: string, state: Object) {
* otherwise.
*/
export function isToolboxVisible(state: Object) {
- const { iAmSipGateway, toolbarConfig: { alwaysVisible } } = state['features/base/config'];
+ const { iAmSipGateway, toolbarConfig } = state['features/base/config'];
+ const { alwaysVisible } = toolbarConfig || {};
const {
timeoutID,
visible