diff options
author | Aleks Xhuvani <34059898+thehydrogen@users.noreply.github.com> | 2023-11-09 23:35:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-09 22:35:53 +0000 |
commit | 7840c6b75b61e64d89d7fd9f291277fb177e513f (patch) | |
tree | 4c7d658734c0257125ebbaa456330bf471eb9d0d | |
parent | e79bf1b1e736d908a90f68f03f1783d27e28c7a8 (diff) |
Do not try to update an undefined video element (#27798)
-rw-r--r-- | app/javascript/mastodon/features/video/index.jsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/javascript/mastodon/features/video/index.jsx b/app/javascript/mastodon/features/video/index.jsx index f88e9042efd..bef14ea2768 100644 --- a/app/javascript/mastodon/features/video/index.jsx +++ b/app/javascript/mastodon/features/video/index.jsx @@ -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; }; |