From b5bfb36b23365cfc7c1a372e449547abdfedbd69 Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 25 Sep 2021 19:32:34 +0100 Subject: [PATCH] . --- anatomy/static/js/anatomy.js | 6 +++--- static/js/anatomy.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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);