aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js')
-rw-r--r--web/js/map-OpenLayers.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 7522ae7d6..272fd6c12 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -433,6 +433,11 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
latitude: $('#fixmystreet\\.latitude').val(),
longitude: $('#fixmystreet\\.longitude').val()
}, function(data) {
+ if (data.error) {
+ // XXX If they then click back and click somewhere in the area, this error will still show.
+ $('#side-form').html('<h1>Reporting a problem</h1><p>' + data.error + '</p>');
+ return;
+ }
$('#councils_text').html(data.councils_text);
$('#form_category_row').html(data.category);
});