]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
wt-plugin: clearify err msg
authorkontrollanten <6680299+kontrollanten@users.noreply.github.com>
Mon, 7 Dec 2020 07:36:28 +0000 (08:36 +0100)
committerkontrollanten <6680299+kontrollanten@users.noreply.github.com>
Mon, 7 Dec 2020 07:43:57 +0000 (08:43 +0100)
client/src/assets/player/webtorrent/webtorrent-plugin.ts

index 96ba497a05dce8dba66c70574bb9d14efd801583..287358ada93e5db5cf3f7c233c17791c24fba5e3 100644 (file)
@@ -139,6 +139,10 @@ class WebTorrentPlugin extends Plugin {
         : this.pickAverageVideoFile()
     }
 
+    if (videoFile === undefined) {
+      throw Error(`Can't update video file since videoFile is undefined.`)
+    }
+
     // Don't add the same video file once again
     if (this.currentVideoFile !== undefined && this.currentVideoFile.magnetUri === videoFile.magnetUri) {
       return