diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2020-12-07 08:36:28 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-12-07 16:52:35 +0100 |
commit | a5a69fc727c819b106210918b9adce30449932d6 (patch) | |
tree | 90e899c2def7a97c30a816bd8ad0b7bff59cb851 /client/src | |
parent | 40360c17d82b33accb34ea974c275e17880c37aa (diff) | |
download | PeerTube-a5a69fc727c819b106210918b9adce30449932d6.tar.gz PeerTube-a5a69fc727c819b106210918b9adce30449932d6.tar.zst PeerTube-a5a69fc727c819b106210918b9adce30449932d6.zip |
wt-plugin: clearify err msg
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/assets/player/webtorrent/webtorrent-plugin.ts | 4 |
1 files changed, 4 insertions, 0 deletions
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 { | |||
139 | : this.pickAverageVideoFile() | 139 | : this.pickAverageVideoFile() |
140 | } | 140 | } |
141 | 141 | ||
142 | if (videoFile === undefined) { | ||
143 | throw Error(`Can't update video file since videoFile is undefined.`) | ||
144 | } | ||
145 | |||
142 | // Don't add the same video file once again | 146 | // Don't add the same video file once again |
143 | if (this.currentVideoFile !== undefined && this.currentVideoFile.magnetUri === videoFile.magnetUri) { | 147 | if (this.currentVideoFile !== undefined && this.currentVideoFile.magnetUri === videoFile.magnetUri) { |
144 | return | 148 | return |