Prevent error when dashSrc isn't initialized

This commit is contained in:
Preston 2020-11-15 13:46:18 -05:00
parent 83f5dea8d4
commit 11ffde44db
1 changed files with 5 additions and 0 deletions

View File

@ -255,8 +255,13 @@ export default Vue.extend({
}, },
determineMaxFramerate: function() { determineMaxFramerate: function() {
if (this.dashSrc.length === 0) {
this.maxFramerate = 60
return
}
fs.readFile(this.dashSrc[0].url, (err, data) => { fs.readFile(this.dashSrc[0].url, (err, data) => {
if (err) { if (err) {
console.log('caught the error')
this.maxFramerate = 60 this.maxFramerate = 60
return return
} }