From 058ff148cfda592a640f3d49b57e46636627bc1c Mon Sep 17 00:00:00 2001 From: Gwendolyn Date: Mon, 11 Dec 2023 13:35:12 +0100 Subject: [PATCH] locate-test sets the user location, so setting the user location should not break if mobileclient is not available --- src/c3nav/site/static/site/js/c3nav.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c3nav/site/static/site/js/c3nav.js b/src/c3nav/site/static/site/js/c3nav.js index 15e75e49..3a73cd1d 100644 --- a/src/c3nav/site/static/site/js/c3nav.js +++ b/src/c3nav/site/static/site/js/c3nav.js @@ -1846,7 +1846,7 @@ c3nav = { $('.locationinput .locate, .leaflet-control-user-location a').text(c3nav._map_material_icon('location_disabled')); $('.leaflet-control-user-location a').toggleClass('control-disabled', true); } - if (mobileclient.isCurrentLocationRequested && mobileclient.isCurrentLocationRequested()) { + if (typeof mobileclient !== 'undefined' && mobileclient.isCurrentLocationRequested && mobileclient.isCurrentLocationRequested()) { if (location) { c3nav._goto_user_location_click(); } else {