浏览代码

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

master
Avram Tudor 3 年前
父节点
当前提交
6b8db2ad9e
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 2
    1
      react/features/toolbox/functions.native.js
  2. 2
    1
      react/features/toolbox/functions.web.js

+ 2
- 1
react/features/toolbox/functions.native.js 查看文件

@@ -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 查看文件

@@ -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

正在加载...
取消
保存