From d958897d70fb39635de66eb2f3d28ca82e3ca9a8 Mon Sep 17 00:00:00 2001 From: Marko Burjek Date: Thu, 10 Apr 2014 09:07:41 +0200 Subject: [PATCH] Fixes loading of stops layer Now Layer with Public transport stops didn't load if each stop didn't have stopUrl. Error was seen only if you open developer console. --- otp-leaflet-client/src/main/webapp/js/otp/layers/StopsLayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otp-leaflet-client/src/main/webapp/js/otp/layers/StopsLayer.js b/otp-leaflet-client/src/main/webapp/js/otp/layers/StopsLayer.js index f6a6f0ec4b9..2b4aa2cd66a 100644 --- a/otp-leaflet-client/src/main/webapp/js/otp/layers/StopsLayer.js +++ b/otp-leaflet-client/src/main/webapp/js/otp/layers/StopsLayer.js @@ -67,7 +67,7 @@ otp.layers.StopsLayer = stop.lon = stop.lon || stop.stopLon; // temporary TriMet specific code - if(stop.stopUrl.indexOf("http://trimet.org") === 0) { + if(stop.stopUrl && stop.stopUrl.indexOf("http://trimet.org") === 0) { stop.titleLink = 'http://www.trimet.org/go/cgi-bin/cstops.pl?action=entry&resptype=U&lang=en&noCat=Landmark&Loc=' + stop.id.id; } //console.log(stop);