Bug fix for studyThumbnails helper that sometimes runs with no data in Lesion Tracker (OHIF-36)

This commit is contained in:
Erik Ziegler committed 2016-08-08 18:45:17 +02:00
1 parent fe32c40832
commit ba76a89e13
2 files changed
+6 -2

No files matched your search

@@ -65,9 +65,9 @@ Template.studyTimepointStudy.events({
if (!alreadyLoaded) {
$study.addClass('loading');
getStudyMetadata(studyInstanceUid, studyData => {
getStudyMetadata(studyInstanceUid, study => {
study.displaySets = createStacks(study);
ViewerStudies.insert(studyData);
ViewerStudies.insert(study);
instance.select(isQuickSwitch);
});
} else {
@@ -2,6 +2,10 @@
* A global Blaze UI helper to get the thumbnails for the given study
*/
Template.registerHelper('studyThumbnails', study => {
if (!study) {
return;
}
// Find the study's stacks
const stacks = study.displaySets;