Skip to content

Commit

Permalink
add guard before APP in middleware.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Radium Zheng committed Aug 7, 2018
1 parent 5a05102 commit 0410af9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions react/features/local-recording/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ isFeatureEnabled
}, 10000));
};

APP.keyboardshortcut.registerShortcut('L', null, () => {
sendAnalytics(createShortcutEvent('local.recording'));
dispatch(toggleDialog(LocalRecordingInfoDialog));
}, 'keyboardShortcuts.localRecording');
typeof APP === 'object' && typeof APP.keyboardshortcut === 'object'
&& APP.keyboardshortcut.registerShortcut('L', null, () => {
sendAnalytics(createShortcutEvent('local.recording'));
dispatch(toggleDialog(LocalRecordingInfoDialog));
}, 'keyboardShortcuts.localRecording');
break;
case APP_WILL_UNMOUNT:
recordingController.onStateChanged = null;
Expand Down

0 comments on commit 0410af9

Please sign in to comment.