[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:
parent
372c455218
commit
dee28c3fbf
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue