about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-07-16 15:01:13 +0200
committerGitHub <noreply@github.com>2020-07-16 15:01:13 +0200
commit801e546ecc1efb4103232d8265229eb455a8dd5b (patch)
tree4bfd6ec330f01a7187dd643d709eda81137c40a7 /app/javascript/flavours/glitch
parent37c092e9fdedd36c167e4b84610e7346c446e1d3 (diff)
parentf94cb947671add34feb13d8d85a67260d2f699a9 (diff)
Merge pull request #1383 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/features/audio/index.js2
-rw-r--r--app/javascript/flavours/glitch/features/video/index.js2
2 files changed, 4 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/audio/index.js b/app/javascript/flavours/glitch/features/audio/index.js
index 9cb2307fd..4e85e3c58 100644
--- a/app/javascript/flavours/glitch/features/audio/index.js
+++ b/app/javascript/flavours/glitch/features/audio/index.js
@@ -283,6 +283,8 @@ class Audio extends React.PureComponent {
 
   _renderCanvas () {
     requestAnimationFrame(() => {
+      if (!this.audio) return;
+
       this.handleTimeUpdate();
       this._clear();
       this._draw();
diff --git a/app/javascript/flavours/glitch/features/video/index.js b/app/javascript/flavours/glitch/features/video/index.js
index 976cdefc0..cc60a0d2e 100644
--- a/app/javascript/flavours/glitch/features/video/index.js
+++ b/app/javascript/flavours/glitch/features/video/index.js
@@ -195,6 +195,8 @@ class Video extends React.PureComponent {
 
   _updateTime () {
     requestAnimationFrame(() => {
+      if (!this.video) return;
+
       this.handleTimeUpdate();
 
       if (!this.state.paused) {