cornerstonejs / cornerstone

JavaScript library to display interactive medical images including but not limited to DICOM
https://docs.cornerstonejs.org/
MIT License
2.04k stars 596 forks source link

cornerstone.getEnabledElement causes console error on element that is not enabled #599

Open kuehlc opened 1 year ago

kuehlc commented 1 year ago

@dannyrb I was looking at the docs and it mentions to store cornerstone.getEnabledElement(element) in a variable and then check the variable to see if it is enabled or not before proceeding. The issue is that it causes an error (sometimes multiple) in the console when calling this function on an element that isn't enabled. Is there another function for this type of check that won't give an error? This is happening in an Angular 11 application.