about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/features/video/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/video/index.js b/app/javascript/mastodon/features/video/index.js
index 8b83fb66b..003bf23a8 100644
--- a/app/javascript/mastodon/features/video/index.js
+++ b/app/javascript/mastodon/features/video/index.js
@@ -210,7 +210,9 @@ export default class Video extends React.PureComponent {
   }
 
   handleProgress = () => {
-    this.setState({ buffer: this.video.buffered.end(0) / this.video.duration * 100 });
+    if (this.video.buffered.length > 0) {
+      this.setState({ buffer: this.video.buffered.end(0) / this.video.duration * 100 });
+    }
   }
 
   handleOpenVideo = () => {