From d06aef5ada4cf248ebe549c4d4ba6b89e8c3be07 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Sat, 09 Feb 2019 10:32:02 +0000
Subject: [PATCH] Fix error in depotIdToVehicleId function

---
 common.js |    2 +-
 map.html  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common.js b/common.js
index f238013..12021ce 100644
--- a/common.js
+++ b/common.js
@@ -117,7 +117,7 @@
 function depotIdToVehicleId(depotId, typeHelper) {
 	if(typeHelper) {
 		for(var prop in vehicles_info) {
-			if(prop.substr(0,1) == type && vehicles_info[prop]['num'].substr(2) == depotId) {
+			if(prop.substr(0,1) == typeHelper && vehicles_info[prop]['num'].substr(2) == depotId) {
 				return prop;
 			}
 		}
diff --git a/map.html b/map.html
index 49e0a5b..2126425 100644
--- a/map.html
+++ b/map.html
@@ -17,7 +17,7 @@
 <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList"></script>
 <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v5.3.0/build/ol.js" integrity="sha384-iQkGyyH4ioz3m+maM3s9MX1Oq67mACa4B9Z3ovUv3Sv37LJ96fx3WnZfLoiC3Wfl" crossorigin="anonymous"></script>
 <script tyle="text/javascript" src="lang_pl.js?v3" id="lang_script"></script>
-<script tyle="text/javascript" src="common.js?v5"></script>
+<script tyle="text/javascript" src="common.js?v6"></script>
 <script tyle="text/javascript" src="map.js?v9"></script>
 </body>
 </html>

--
Gitblit v1.9.1