From 326ad34b82e744b98d3341f3b70d64406f73ebc9 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Thu, 31 Jan 2019 13:35:54 +0000
Subject: [PATCH] Verify longitude and latitude are present before adding feature

---
 index.js |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/index.js b/index.js
index 3a7e3f5..8780766 100644
--- a/index.js
+++ b/index.js
@@ -139,7 +139,9 @@
 			
 			if(data.actual[i].status == 'STOPPING') {
 				tr.className = 'success';
-				status_cell.className = 'status-boarding';
+				if (data.actual[i].actualRelativeTime <= 0) {
+					status_cell.className = 'status-boarding';
+				}
 			} else if(parseInt(delay) > 9) {
 				tr.className = 'danger';
 				delay_cell.className = 'status-delayed';
@@ -400,6 +402,8 @@
 		setText(vehicle_data_style, '.vehicleData { display: table-cell; }')
 	});
 	
+	updateVehicleInfo()
+	
 	hash();
 	
 	window.addEventListener('hashchange', hash);

--
Gitblit v1.9.1