Make sure our app doesn't blow up if hotkeys aren't provided

This commit is contained in:
dannyrb 2019-06-08 15:26:11 -04:00
parent 78068bed4b
commit 9d9b3a7749

View File

@ -42,7 +42,9 @@ const hotkeysManager = new HotkeysManager(commandsManager);
// TODO: Should be done in extensions w/ commandsModule
// ~~ ADD COMMANDS
appCommands.init(commandsManager);
hotkeysManager.setHotkeys(window.config.hotkeys, true);
if (window.config.hotkeys) {
hotkeysManager.setHotkeys(window.config.hotkeys, true);
}
// Force active contexts for now. These should be set in Viewer/ActiveViewer
store.dispatch({