Browse Source

add guard before APP in middleware.js

master
Radium Zheng 6 years ago
parent
commit
0410af9e5e
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      react/features/local-recording/middleware.js

+ 5
- 4
react/features/local-recording/middleware.js View File

@@ -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…
Cancel
Save