style(AudioTrack): improve readability

Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
This commit is contained in:
Hristo Terezov 2021-01-06 16:19:20 -06:00
parent e161cbc4bd
commit 5a55c7b965
1 changed files with 2 additions and 2 deletions

View File

@ -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);