fix(server options) Prevent issues when servers are defined without logging options (closes #74)
This commit is contained in:
parent
16281366c8
commit
6b20b67ee4
@ -203,21 +203,21 @@ const makeRequestSync = Meteor.wrapAsync(makeRequest);
|
||||
// TODO: Unify this stuff with the getJSON code
|
||||
DICOMWeb.getBulkData = function(geturl, options) {
|
||||
|
||||
if (options.logRequests) {
|
||||
if (options && options.logRequests) {
|
||||
OHIF.log.info(geturl);
|
||||
}
|
||||
|
||||
if (options.logTiming) {
|
||||
if (options && options.logTiming) {
|
||||
console.time(geturl);
|
||||
}
|
||||
|
||||
var result = makeRequestSync(geturl, options);
|
||||
|
||||
if (options.logTiming) {
|
||||
if (options && options.logTiming) {
|
||||
console.timeEnd(geturl);
|
||||
}
|
||||
|
||||
if (options.logResponses) {
|
||||
if (options && options.logResponses) {
|
||||
OHIF.log.info(result);
|
||||
}
|
||||
|
||||
|
||||
@ -88,21 +88,21 @@ function makeRequest(geturl, options, callback) {
|
||||
const makeRequestSync = Meteor.wrapAsync(makeRequest);
|
||||
|
||||
DICOMWeb.getJSON = function(geturl, options) {
|
||||
if (options.logRequests) {
|
||||
if (options && options.logRequests) {
|
||||
OHIF.log.info(geturl);
|
||||
}
|
||||
|
||||
if (options.logTiming) {
|
||||
if (options && options.logTiming) {
|
||||
console.time(geturl);
|
||||
}
|
||||
|
||||
const result = makeRequestSync(geturl, options);
|
||||
|
||||
if (options.logTiming) {
|
||||
if (options && options.logTiming) {
|
||||
console.timeEnd(geturl);
|
||||
}
|
||||
|
||||
if (options.logResponses) {
|
||||
if (options && options.logResponses) {
|
||||
OHIF.log.info(result);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user