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

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

View File

@ -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 {

View File

@ -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;