[Glitch] Do not try to update an undefined video element

Port 7840c6b75b to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Aleks Xhuvani 2023-11-09 23:35:53 +01:00 committed by Claire
parent 372c455218
commit dee28c3fbf

View file

@ -441,6 +441,10 @@ class Video extends PureComponent {
};
_syncVideoToVolumeState = (volume = null, muted = null) => {
if (!this.video) {
return;
}
this.video.volume = volume ?? this.state.volume;
this.video.muted = muted ?? this.state.muted;
};