fix: 🐛 - Put guards in all places that a cornerstone re-render (#1899)

* fix: 🐛 - Put guards in all places that a cornerstone re-render
This commit is contained in:
James Petts authored and GitHub committed 2020-07-13 18:02:23 +02:00
1 parent 029f8af4c7
commit 451f7eab92
11 files changed
+53 -29

No files matched your search

@@ -5,7 +5,9 @@ import structureSetReferencesSeriesInstanceUid from './lib/structureSetReference
// We should put this as a helper somewhere as we are using it in mutliple places.
function refreshViewport() {
cornerstone.getEnabledElements().forEach(enabledElement => {
cornerstone.updateImage(enabledElement.element);
if (enabledElement.image) {
cornerstone.updateImage(enabledElement.element);
}
});
}