Skip to content

Commit

Permalink
Do not try to update an undefined video element (mastodon#27798)
Browse files Browse the repository at this point in the history
  • Loading branch information
thehydrogen authored Nov 9, 2023
1 parent e79bf1b commit 7840c6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/javascript/mastodon/features/video/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,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;
};
Expand Down

0 comments on commit 7840c6b

Please sign in to comment.