Browse Source

fix(config) fix prejoin throwing a TypeError due to late config initialization (#10041)

master
Avram Tudor 3 years ago
parent
commit
6b8db2ad9e
No account linked to committer's email address

+ 2
- 1
react/features/toolbox/functions.native.js View File

@@ -60,7 +60,8 @@ export function getMovableButtons(width: number): Set<string> {
60 60
  */
61 61
 export function isToolboxVisible(stateful: Object | Function) {
62 62
     const state = toState(stateful);
63
-    const { toolbarConfig: { alwaysVisible } } = state['features/base/config'];
63
+    const { toolbarConfig } = state['features/base/config'];
64
+    const { alwaysVisible } = toolbarConfig || {};
64 65
     const { enabled, visible } = state['features/toolbox'];
65 66
     const participantCount = getParticipantCountWithFake(state);
66 67
     const alwaysVisibleFlag = getFeatureFlag(state, TOOLBOX_ALWAYS_VISIBLE, false);

+ 2
- 1
react/features/toolbox/functions.web.js View File

@@ -39,7 +39,8 @@ export function isButtonEnabled(name: string, state: Object) {
39 39
  * otherwise.
40 40
  */
41 41
 export function isToolboxVisible(state: Object) {
42
-    const { iAmSipGateway, toolbarConfig: { alwaysVisible } } = state['features/base/config'];
42
+    const { iAmSipGateway, toolbarConfig } = state['features/base/config'];
43
+    const { alwaysVisible } = toolbarConfig || {};
43 44
     const {
44 45
         timeoutID,
45 46
         visible

Loading…
Cancel
Save