From 09134b9005011cfef1a0e9bb6a905dc18e3e4255 Mon Sep 17 00:00:00 2001 From: nicco Date: Mon, 25 Dec 2017 13:23:52 +0100 Subject: [PATCH] Limit to 3 perdirection --- app/res/js/vue/dvb-line.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/res/js/vue/dvb-line.js b/app/res/js/vue/dvb-line.js index c7dd44b..fd180fd 100644 --- a/app/res/js/vue/dvb-line.js +++ b/app/res/js/vue/dvb-line.js @@ -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,7 +67,8 @@ Vue.component('dvb-line', { this.directions[i.Direction] = [] // 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)