File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -550,22 +550,17 @@ class CornerstoneViewport extends Component {
550550 // TODO[cornerstoneTools]: Make this happen internally
551551 cornerstoneTools . clearToolState ( element , 'stackPrefetch' ) ;
552552
553- // Disable the viewport element with Cornerstone
554- // This also triggers the removal of the element from all available
555- // synchronizers, such as the one used for reference lines.
556- cornerstone . disable ( element ) ;
557-
558553 // Try to stop any currently playing clips
559554 // Otherwise the interval will continuously throw errors
560555 // TODO[cornerstoneTools]: Make this happen internally
561- try {
562- const enabledElement = cornerstone . getEnabledElement ( element ) ;
563- if ( enabledElement ) {
564- cornerstoneTools . stopClip ( element ) ;
565- }
566- } catch ( error ) {
567- //console.warn(error);
556+ const enabledElement = cornerstone . getEnabledElement ( element ) ;
557+ if ( enabledElement ) {
558+ cornerstoneTools . stopClip ( element ) ;
568559 }
560+ // Disable the viewport element with Cornerstone
561+ // This also triggers the removal of the element from all available
562+ // synchronizers, such as the one used for reference lines.
563+ cornerstone . disable ( element ) ;
569564
570565 if ( this . props . clearViewportSpecificData ) {
571566 this . props . clearViewportSpecificData ( ) ;
You can’t perform that action at this time.
0 commit comments