From 16c2dccfa28b420e8585e21549b60304dbd4bf11 Mon Sep 17 00:00:00 2001 From: kontrollanten <6680299+kontrollanten@users.noreply.github.com> Date: Mon, 7 Dec 2020 08:36:28 +0100 Subject: [PATCH] wt-plugin: clearify err msg --- client/src/assets/player/webtorrent/webtorrent-plugin.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts index 96ba497a0..287358ada 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 -- 2.41.0