]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/webtorrent/webtorrent-plugin.ts
Use source sans 3 font
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / webtorrent / webtorrent-plugin.ts
index 287358ada93e5db5cf3f7c233c17791c24fba5e3..4bb438e57ab841016999018d8812a7e2e7be5469 100644 (file)
@@ -132,14 +132,14 @@ class WebTorrentPlugin extends Plugin {
     done: () => void = () => { /* empty */ }
   ) {
     // Automatically choose the adapted video file
-    if (videoFile === undefined) {
+    if (!videoFile) {
       const savedAverageBandwidth = getAverageBandwidthInStore()
       videoFile = savedAverageBandwidth
         ? this.getAppropriateFile(savedAverageBandwidth)
         : this.pickAverageVideoFile()
     }
 
-    if (videoFile === undefined) {
+    if (!videoFile) {
       throw Error(`Can't update video file since videoFile is undefined.`)
     }