Skip to content

Commit

Permalink
fix: changed new image handler conditional for 0 edge case (OHIF#2338)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Andersen <[email protected]>
Co-authored-by: Erik Ziegler <[email protected]>
  • Loading branch information
3 people authored Jul 26, 2021
1 parent bad6702 commit b8ae92c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/cornerstone/src/OHIFCornerstoneViewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class OHIFCornerstoneViewport extends Component {

if (
displaySet.displaySetInstanceUID !==
prevDisplaySet.displaySetInstanceUID ||
prevDisplaySet.displaySetInstanceUID ||
displaySet.SOPInstanceUID !== prevDisplaySet.SOPInstanceUID ||
displaySet.frameIndex !== prevDisplaySet.frameIndex
) {
Expand Down Expand Up @@ -221,7 +221,7 @@ class OHIFCornerstoneViewport extends Component {
const { displaySet } = this.props.viewportData;
const { StudyInstanceUID } = displaySet;

if (currentImageIdIndex > 0) {
if (currentImageIdIndex >= 0) {
this.props.onNewImage({
StudyInstanceUID,
SOPInstanceUID: sopInstanceUid,
Expand Down

0 comments on commit b8ae92c

Please sign in to comment.