瀏覽代碼

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

Loading…
取消
儲存