Skip to content

Commit

Permalink
fix label segments bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Dec 29, 2023
1 parent 60712ce commit ab413d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hooks/useSegments.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ export default ({
if (selectedSegmentsRaw.length < 1) return;
const { name } = selectedSegmentsRaw[0];
const value = await labelSegmentDialog({ currentName: name, maxLength: maxLabelLength });
if (value == null) return;
setCutSegments((existingSegments) => existingSegments.map((existingSegment) => {
if (selectedSegmentsRaw.some((seg) => seg.segId === existingSegment.segId)) return { ...existingSegment, name: value };
return existingSegment;
Expand Down

0 comments on commit ab413d2

Please sign in to comment.