From 4757bb73e4d812870684f5d643b8d9f54d7ad61c Mon Sep 17 00:00:00 2001 From: Paul Kaplan <pkaplan@media.mit.edu> Date: Wed, 31 Jul 2019 10:27:15 -0400 Subject: [PATCH] Do not update trimmers only if both have not changed --- src/containers/audio-selector.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/containers/audio-selector.jsx b/src/containers/audio-selector.jsx index 2d5974d5c..5af1f4e9c 100644 --- a/src/containers/audio-selector.jsx +++ b/src/containers/audio-selector.jsx @@ -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 -- GitLab