aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/fixmystreet.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-09-01 17:18:08 +0100
committerMatthew Somerville <matthew@mysociety.org>2015-09-01 17:18:08 +0100
commitd713f8838843d557f5901f801acbc6fcbf31a025 (patch)
tree0335499f1df68159e47cdb619e9ecb0cd39b31ce /web/js/fixmystreet.js
parentc19ef68c269dd0b99e02c3b892b1eb28d0c3791a (diff)
Fix location bug fetching category extras.
On a form, except one where you skipped the map, the category change call would use the initial map centre, rather than the map pin location.
Diffstat (limited to 'web/js/fixmystreet.js')
-rw-r--r--web/js/fixmystreet.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index 78372d68c..7d8c940d9 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -177,13 +177,8 @@ $(function(){
category: $(this).val()
};
- if ( typeof fixmystreet !== 'undefined' ) {
- args.latitude = fixmystreet.latitude;
- args.longitude = fixmystreet.longitude;
- } else {
- args.latitude = $('input[name="latitude"]').val();
- args.longitude = $('input[name="longitude"]').val();
- }
+ args.latitude = $('input[name="latitude"]').val();
+ args.longitude = $('input[name="longitude"]').val();
$.getJSON('/report/new/category_extras', args, function(data) {
var $category_meta = $('#category_meta');