Limit to 3 perdirection

This commit is contained in:
nicco 2017-12-25 13:23:52 +01:00
parent 7ec7eb5b4b
commit 09134b9005

View File

@ -39,7 +39,6 @@ Vue.component('dvb-line', {
clearInterval(this.watcherId)
},
update() {
console.log('Updating...')
fetch('https://webapi.vvo-online.de/dm', {
mode: 'cors',
headers: {
@ -68,6 +67,7 @@ Vue.component('dvb-line', {
this.directions[i.Direction] = []
// Inset departure into array
if (this.directions[i.Direction].length < 3)
this.directions[i.Direction].push(i)
}