From d1c2d687567e37d1ce2e7cdc418a6d8330664660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Tue, 24 Dec 2019 22:00:50 +0100 Subject: [PATCH] can't report locationgroups --- src/c3nav/site/static/site/js/c3nav.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/c3nav/site/static/site/js/c3nav.js b/src/c3nav/site/static/site/js/c3nav.js index 98a82bf8..98cb6aa8 100644 --- a/src/c3nav/site/static/site/js/c3nav.js +++ b/src/c3nav/site/static/site/js/c3nav.js @@ -403,11 +403,15 @@ c3nav = { $editor.hide(); } - var custom_location = typeof data.id !== 'number', - report_url = '/report/l/'+String(data.id)+'/'; - $location_details.find('.report').attr('href', report_url); - $location_details.find('.report-issue').toggle(!custom_location); - $location_details.find('.report-missing').toggle(custom_location); + if (data.geometry) { + var custom_location = typeof data.id !== 'number', + report_url = '/report/l/'+String(data.id)+'/'; + $location_details.find('.report').attr('href', report_url); + $location_details.find('.report-issue').toggle(!custom_location); + $location_details.find('.report-missing').toggle(custom_location); + } else { + $location_details.find('.report').hide(); + } if (data.geometry && data.level) { L.geoJSON(data.geometry, {