Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

wt-plugin: clearify err msg

kontrollantena5a69fc727c8
diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
index 96ba497a05..287358ada9 100644
--- a/client/src/assets/player/webtorrent/webtorrent-plugin.ts
+++ b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
@@ -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