Skip to content

Commit

Permalink
fix(segmentation): resolve variable declaration and null check issues
Browse files Browse the repository at this point in the history
* Fixed variable redeclaration in `ensureImageVolume.ts`
* Updated null checks in `getStrategyData.ts` to use more robust comparison
  • Loading branch information
sedghi committed Mar 4, 2025
1 parent e1b5bc6 commit 6644bdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {

let referencedImageIds;
if (viewport) {
const referencedImageIds = viewport.getImageIds();
referencedImageIds = viewport.getImageIds();
const isValidVolumeForSphere = csUtils.isValidVolume(referencedImageIds);
if (!isValidVolumeForSphere) {
throw new Error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ function getStrategyData({
strategy: unknown;
}) {
if (
('volumeId' in operationData && operationData.volumeId !== undefined) ||
('volumeId' in operationData && operationData.volumeId != null) ||
('referencedVolumeId' in operationData &&
operationData.referencedVolumeId !== undefined)
operationData.referencedVolumeId != null)
) {
return getStrategyDataForVolumeViewport({ operationData });
}
Expand Down

0 comments on commit 6644bdb

Please sign in to comment.