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) {
+ if (!videoFile) {
throw Error(`Can't update video file since videoFile is undefined.`)
}