add guard before APP in middleware.js

This commit is contained in:
Radium Zheng 2018-08-01 11:43:56 +10:00
parent 5a051024e6
commit 0410af9e5e
1 changed files with 5 additions and 4 deletions

View File

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