소스 검색

add guard before APP in middleware.js

master
Radium Zheng 7 년 전
부모
커밋
0410af9e5e
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5
    4
      react/features/local-recording/middleware.js

+ 5
- 4
react/features/local-recording/middleware.js 파일 보기

@@ -64,10 +64,11 @@ isFeatureEnabled
64 64
             }, 10000));
65 65
         };
66 66
 
67
-        APP.keyboardshortcut.registerShortcut('L', null, () => {
68
-            sendAnalytics(createShortcutEvent('local.recording'));
69
-            dispatch(toggleDialog(LocalRecordingInfoDialog));
70
-        }, 'keyboardShortcuts.localRecording');
67
+        typeof APP === 'object' && typeof APP.keyboardshortcut === 'object'
68
+            && APP.keyboardshortcut.registerShortcut('L', null, () => {
69
+                sendAnalytics(createShortcutEvent('local.recording'));
70
+                dispatch(toggleDialog(LocalRecordingInfoDialog));
71
+            }, 'keyboardShortcuts.localRecording');
71 72
         break;
72 73
     case APP_WILL_UNMOUNT:
73 74
         recordingController.onStateChanged = null;

Loading…
취소
저장