Reset segments when last segment is deleted

pull/333/head
Mikael Finstad 2020-04-18 19:33:56 +08:00
rodzic ed5395ae25
commit 0c584f4b35
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -711,7 +711,10 @@ const App = memo(() => {
}, [copyAnyAudioTrack, filePath, mainStreams]);
const removeCutSegment = useCallback(() => {
if (cutSegments.length < 2) return;
if (cutSegments.length <= 1) {
setCutSegments(createInitialCutSegments());
return;
}
const cutSegmentsNew = [...cutSegments];
cutSegmentsNew.splice(currentSegIndexSafe, 1);