diff --git a/anatomy/static/js/anatomy.js b/anatomy/static/js/anatomy.js index 0067daca..03e96608 100644 --- a/anatomy/static/js/anatomy.js +++ b/anatomy/static/js/anatomy.js @@ -172,11 +172,11 @@ function loadDicomViewer(images_to_load, annotations_to_load) { if (images_to_load != undefined) { images = images_to_load; //} else if (images.indexOf(",") > 0) { - } else if (images != undefined) { - images = JSON.parse(images); - } else { + } else if (images == undefined || images == "") { // No images to load return + } else { + images = JSON.parse(images); } console.log(images); diff --git a/static/js/anatomy.js b/static/js/anatomy.js index 0067daca..03e96608 100644 --- a/static/js/anatomy.js +++ b/static/js/anatomy.js @@ -172,11 +172,11 @@ function loadDicomViewer(images_to_load, annotations_to_load) { if (images_to_load != undefined) { images = images_to_load; //} else if (images.indexOf(",") > 0) { - } else if (images != undefined) { - images = JSON.parse(images); - } else { + } else if (images == undefined || images == "") { // No images to load return + } else { + images = JSON.parse(images); } console.log(images);