From 8be3c44ca62c77a90b73d451124d33a3ac330cf1 Mon Sep 17 00:00:00 2001
From: Birte Kristina Friesel <derf@finalrewind.org>
Date: Mon, 24 Jun 2024 17:16:29 +0200
Subject: [PATCH] geolocation: correctly reference hafas variable

(copy-paste error)

Closes #146
---
 public/static/js/geolocation.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/public/static/js/geolocation.js b/public/static/js/geolocation.js
index 1c30145f..26ca349b 100644
--- a/public/static/js/geolocation.js
+++ b/public/static/js/geolocation.js
@@ -51,7 +51,7 @@ $(document).ready(function() {
 					hafas = candidate.hafas,
 					distance = candidate.distance.toFixed(1);
 
-				const node = $('<a class="tablerow" href="/s/' + eva + '?hafas=' + hafas + '"><span><i class="material-icons" aria-hidden="true">' + (parts[2] == 0 ? 'train' : 'directions') + '</i>' + name + '</span></a>');
+				const node = $('<a class="tablerow" href="/s/' + eva + '?hafas=' + hafas + '"><span><i class="material-icons" aria-hidden="true">' + (hafas == '0' ? 'train' : 'directions') + '</i>' + name + '</span></a>');
 				node.click(function() {
 					$('nav .preloader-wrapper').addClass('active');
 				});
-- 
GitLab