diff --git a/public/static/js/geolocation.js b/public/static/js/geolocation.js
index 03857a1..1c30145 100644
--- a/public/static/js/geolocation.js
+++ b/public/static/js/geolocation.js
@@ -24,7 +24,7 @@ $(document).ready(function() {
const res = $(document.createElement('p'));
$.each(stops, function(i, stop) {
const parts = stop.split(';');
- const node = $('' + (parseInt(parts[2]) ? 'directions' : 'train') + '' + parts[1] + '');
+ const node = $('' + (parts[2] == '0' ? 'train' : 'directions') + '' + parts[1] + '');
node.click(function() {
$('nav .preloader-wrapper').addClass('active');
});
@@ -51,7 +51,7 @@ $(document).ready(function() {
hafas = candidate.hafas,
distance = candidate.distance.toFixed(1);
- const node = $('' + (parseInt(hafas) ? 'directions' : 'train') + '' + name + '');
+ const node = $('' + (parts[2] == 0 ? 'train' : 'directions') + '' + name + '');
node.click(function() {
$('nav .preloader-wrapper').addClass('active');
});