Mercurial > hg > orthanc-stone
diff Applications/StoneWebViewer/WebApplication/app.js @ 1700:f1bd464dc3e1
the plugin uses the Orthanc configuration instead of the default configuration
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 27 Nov 2020 10:55:21 +0100 |
parents | 0598c87e1e88 |
children | b5a8bf32d969 |
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebApplication/app.js Fri Nov 27 10:21:48 2020 +0100 +++ b/Applications/StoneWebViewer/WebApplication/app.js Fri Nov 27 10:55:21 2020 +0100 @@ -861,7 +861,12 @@ axios.get(CONFIGURATION_SOURCE) .then(function(response) { - app.globalConfiguration = ParseJsonWithComments(response.data); + app.globalConfiguration = ParseJsonWithComments(response.data) ['StoneWebViewer']; + + if (app.globalConfiguration === undefined) { + console.warn('Empty configuration file'); + app.globalConfiguration = {}; + } // Option 1: Loading script using plain HTML