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

Port 7840c6b75b to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
th-new
Aleks Xhuvani 2023-11-09 23:35:53 +01:00 committed by Claire
parent 372c455218
commit dee28c3fbf
1 changed files with 4 additions and 0 deletions

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;
};