Prevent error when dashSrc isn't initialized
This commit is contained in:
parent
83f5dea8d4
commit
11ffde44db
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue