From: kontrollanten <6680299+kontrollanten@users.noreply.github.com> Date: Mon, 7 Dec 2020 07:36:28 +0000 (+0100) Subject: wt-plugin: clearify err msg X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=16c2dccfa28b420e8585e21549b60304dbd4bf11;p=github%2FChocobozzz%2FPeerTube.git wt-plugin: clearify err msg --- 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