LT-288: Fixing viewer crash for non associated studies

This commit is contained in:
Bruno Alves de Faria committed 2016-08-29 09:10:51 -03:00
1 parent 0eeb05e72b
commit 396f83b449
7 files changed
+88 -38

No files matched your search

@@ -7,7 +7,14 @@ Template.caseProgress.onCreated(() => {
instance.progressText = new ReactiveVar();
instance.isLocked = new ReactiveVar();
// Get the current timepoint
const current = instance.data.timepointApi.current();
// Stop here if no timepoint was found
if (!current) {
return;
}
if (!current.timepointId) {
console.warn('Case has no timepointId');
return;