Skip to content
Snippets Groups Projects
Unverified Commit 1c621b7e authored by Paul Kaplan's avatar Paul Kaplan Committed by GitHub
Browse files

Merge pull request #4357 from paulkaplan/fix-sound-trimming

Clear trim handles if trim cannot be completed.
parents 8e5e7b0d a2cc320d
No related branches found
No related tags found
No related merge requests found
......@@ -136,6 +136,12 @@ class SoundEditor extends React.Component {
if (endIndex > startIndex) { // Strictly greater to prevent 0 sample sounds
const clippedSamples = samples.slice(startIndex, endIndex);
this.submitNewSamples(clippedSamples, sampleRate);
} else {
// Just clear the trim state, it cannot be completed
this.setState({
trimStart: null,
trimEnd: null
});
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment