fix(config): Stop crashes if window.config is not defined when script-tag viewer is loaded
This commit is contained in:
1 parent
c5f532159b
commit
02c732aa15
3 files changed
+3
-7
No files matched your search
+1
-1
@@ -72,7 +72,7 @@ extensionManager.registerExtensions([
|
||||
]);
|
||||
|
||||
// Must run after extension commands are registered
|
||||
if (window.config.hotkeys) {
|
||||
if (window.config && window.config.hotkeys) {
|
||||
hotkeysManager.setHotkeys(window.config.hotkeys, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ class OHIFStandaloneViewer extends Component {
|
||||
];
|
||||
|
||||
const showStudyList =
|
||||
window.config.showStudyList !== undefined
|
||||
window.config && window.config.showStudyList !== undefined
|
||||
? window.config.showStudyList
|
||||
: true;
|
||||
if (showStudyList) {
|
||||
|
||||
Reference in new issue
Block a user