diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-09-01 17:18:08 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-09-01 17:18:08 +0100 |
commit | d713f8838843d557f5901f801acbc6fcbf31a025 (patch) | |
tree | 0335499f1df68159e47cdb619e9ecb0cd39b31ce /web | |
parent | c19ef68c269dd0b99e02c3b892b1eb28d0c3791a (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')
-rw-r--r-- | web/js/fixmystreet.js | 9 |
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'); |