Skip to content

Commit 1259457

Browse files
Merge pull request scratchfoundation#5047 from paulkaplan/fix-zero-trim-update
Do not update trimmers only if both have not changed
2 parents 7d1dfb6 + 4757bb7 commit 1259457

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/containers/audio-selector.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class AudioSelector extends React.Component {
4343
});
4444
}
4545
componentWillReceiveProps (newProps) {
46-
if (newProps.trimStart === this.props.trimStart) return;
46+
const {trimStart, trimEnd} = this.props;
47+
if (newProps.trimStart === trimStart && newProps.trimEnd === trimEnd) return;
4748
this.setState({
4849
trimStart: newProps.trimStart,
4950
trimEnd: newProps.trimEnd

0 commit comments

Comments
 (0)