OHIF-125: Fix Exception caused by Cornerstone Tools when sending empty viewports and/or not DOM elements to its functions

This commit is contained in:
Eloízio Salgado committed 2016-11-04 10:31:54 -02:00
1 parent 7d199ab462
commit dfcc64d2ca
4 files changed
+35 -25

No files matched your search

@@ -16,7 +16,7 @@ enablePrefetchOnElement = function(element) {
});
// Make sure there is a stack to fetch
var stack = cornerstoneTools.getToolState(element, 'stack');
const stack = cornerstoneTools.getToolState(element, 'stack');
if (stack && stack.data.length && stack.data[0].imageIds.length > 1) {
cornerstoneTools.stackPrefetch.enable(element);
}