Skip to content

Commit

Permalink
Fix a bug to ensure all segmentations are removed
Browse files Browse the repository at this point in the history
  • Loading branch information
stada526 committed Dec 30, 2024
1 parent 1732887 commit 0a852a9
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ export function removeAllSegmentations(): void {
const segmentations = segmentationStateManager.getState().segmentations;

// Remove each segmentation
segmentations.forEach((segmentation) => {
removeSegmentation(segmentation.segmentationId);
const segmentationIds = segmentations.map(
(segmentation) => segmentation.segmentationId
);
segmentationIds.forEach((segmentationId) => {
removeSegmentation(segmentationId);
});

// Clear the state
Expand Down

0 comments on commit 0a852a9

Please sign in to comment.