From 07dae439ef2617451cd0aa4e9ecebf5d86f5e078 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <jkowalsk@student.agh.edu.pl>
Date: Sat, 01 Sep 2018 10:56:34 +0000
Subject: [PATCH] Merge pull request #15 from tsedor/patch-1

---
 map.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/map.js b/map.js
index d5e037e..0c553fb 100644
--- a/map.js
+++ b/map.js
@@ -170,7 +170,7 @@
 			if(vehicle.isDeleted) {
 				if(vehicle_feature) {
 					vehicles_source.removeFeature(vehicle_feature);
-					if(feature_clicked.getId() == vehicle_feature.getId()) {
+					if(feature_clicked && feature_clicked.getId() === vehicle_feature.getId()) {
 						featureClicked();
 					}
 				}
@@ -258,7 +258,7 @@
 			+ '?tripId=' + encodeURIComponent(tripId)
 			+ '&mode=departure'
 	).done(function(data) {
-		if(!data.routeName || !data.directionText || data.old.length + data.actual.length == 0) {
+		if(!data.routeName || !data.directionText) {
 			return;
 		}
 		

--
Gitblit v1.9.1