Merge pull request #5047 from paulkaplan/fix-zero-trim-update

Do not update trimmers only if both have not changed
This commit is contained in:
Eric Rosenbaum authored and GitHub committed 2019-07-31 10:41:03 -04:00
commit 1259457ee4
1 file changed
+2 -1
+2 -1
View File
@@ -43,7 +43,8 @@ class AudioSelector extends React.Component {
});
}
componentWillReceiveProps (newProps) {
if (newProps.trimStart === this.props.trimStart) return;
const {trimStart, trimEnd} = this.props;
if (newProps.trimStart === trimStart && newProps.trimEnd === trimEnd) return;
this.setState({
trimStart: newProps.trimStart,
trimEnd: newProps.trimEnd