mirror of
https://github.com/cupcakearmy/dvb.git
synced 2024-11-05 01:04:17 +01:00
Limit to 3 perdirection
This commit is contained in:
parent
7ec7eb5b4b
commit
09134b9005
@ -39,7 +39,6 @@ Vue.component('dvb-line', {
|
|||||||
clearInterval(this.watcherId)
|
clearInterval(this.watcherId)
|
||||||
},
|
},
|
||||||
update() {
|
update() {
|
||||||
console.log('Updating...')
|
|
||||||
fetch('https://webapi.vvo-online.de/dm', {
|
fetch('https://webapi.vvo-online.de/dm', {
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
headers: {
|
headers: {
|
||||||
@ -68,7 +67,8 @@ Vue.component('dvb-line', {
|
|||||||
this.directions[i.Direction] = []
|
this.directions[i.Direction] = []
|
||||||
|
|
||||||
// Inset departure into array
|
// Inset departure into array
|
||||||
this.directions[i.Direction].push(i)
|
if (this.directions[i.Direction].length < 3)
|
||||||
|
this.directions[i.Direction].push(i)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.directions = Object.keys(this.directions)
|
this.directions = Object.keys(this.directions)
|
||||||
|
Loading…
Reference in New Issue
Block a user