style(AudioTrack): improve readability
Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
This commit is contained in:
parent
e161cbc4bd
commit
5a55c7b965
|
@ -123,8 +123,8 @@ export default class AudioTrack extends Component<Props> {
|
||||||
* from React.
|
* from React.
|
||||||
*/
|
*/
|
||||||
shouldComponentUpdate(nextProps: Props) {
|
shouldComponentUpdate(nextProps: Props) {
|
||||||
const currentJitsiTrack = this.props.audioTrack && this.props.audioTrack.jitsiTrack;
|
const currentJitsiTrack = this.props.audioTrack?.jitsiTrack;
|
||||||
const nextJitsiTrack = nextProps.audioTrack && nextProps.audioTrack.jitsiTrack;
|
const nextJitsiTrack = nextProps.audioTrack?.jitsiTrack;
|
||||||
|
|
||||||
if (currentJitsiTrack !== nextJitsiTrack) {
|
if (currentJitsiTrack !== nextJitsiTrack) {
|
||||||
this._detachTrack(this.props.audioTrack);
|
this._detachTrack(this.props.audioTrack);
|
||||||
|
|
Loading…
Reference in New Issue