diff --git a/rapids/templates/rapids/rapid_form.html b/rapids/templates/rapids/rapid_form.html index 5af9b15a..54035367 100755 --- a/rapids/templates/rapids/rapid_form.html +++ b/rapids/templates/rapids/rapid_form.html @@ -465,12 +465,13 @@ $(el).parent().parent().find(".temp-thumb").remove(); + let imageId; if (el.files[0].type.startsWith("image")) { - const imageId = `${url}`; + imageId = `${url}`; } else { - const imageId = `wadouri:${url}`; + imageId = `wadouri:${url}`; } - const element = $(`
`).get(0) + const element = $(``).get(0) $(el).parent().parent().prepend(element); cornerstone.enable(element); cornerstone.loadAndCacheImage(imageId).then(function (image) {